Skip to content

Function: isArrLikeSafe()

isArrLikeSafe<K, V>(x): x is IterableList<K, V>

Defined in: packages/core/src/is/isArr.ts:31

Check if value is convertible to an array by using Array.from(x) even if it comes from a different realm (eg: iframe, iframes, worker contexts, node vm contexts, browser extensions).

Caution: much slower than isArrLike due to use of Object.prototype.toString.call()

Type Parameters

K

K = unknown

V

V = unknown

Parameters

x

unknown

Returns

x is IterableList<K, V>