mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-26 13:45:15 -07:00
feat: size, first, last support arraylike objects, #781
This commit is contained in:
@@ -93,6 +93,10 @@ export function isArray (value: any): value is any[] {
|
||||
return toString.call(value) === '[object Array]'
|
||||
}
|
||||
|
||||
export function isArrayLike (value: any): value is any[] {
|
||||
return value && isNumber(value.length)
|
||||
}
|
||||
|
||||
export function isIterable (value: any): value is Iterable<any> {
|
||||
return isObject(value) && Symbol.iterator in value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user