perf: use polymophism instead duck test

This commit is contained in:
harttle
2019-03-25 20:11:23 +08:00
parent 64dd057552
commit 82d7673554
18 changed files with 120 additions and 98 deletions
-4
View File
@@ -36,10 +36,6 @@ export function toLiquid (value: any): any {
return value
}
export function create<T1 extends object, T2 extends T1 = T1> (proto: T1): T2 {
return Object.create(proto)
}
export function isNil (value: any): boolean {
return value === null || value === undefined
}