Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

is-array-like-x

2.1.2 • Public • Published

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

is-array-like-x

Determine if a value is array like.

module.exports(value)boolean

Checks if value is array-like. A value is considered array-like if it's not a function and has a length that's an integer greater than or equal to 0 and less than or equal to Number.MAX_SAFE_INTEGER.

Kind: Exported function
Returns: boolean - Returns true if subject is array-like, else false.

Param Type Description
value * The object to be tested.

Example

import isArrayLike from 'is-array-like-x';
 
console.log(isArrayLike([1, 2, 3])); // true
console.log(isArrayLike(document.body.children)); // true
console.log(isArrayLike('abc')); // true
console.log(isArrayLike(isArrayLike)); // false

Install

npm i is-array-like-x

DownloadsWeekly Downloads

1,221

Version

2.1.2

License

MIT

Unpacked Size

242 kB

Total Files

11

Last publish

Collaborators

  • avatar