UNPKG

@extra-array/is

Version:
43 lines (30 loc) 994 B
Checks if value is array. [:package:](https://www.npmjs.com/package/@extra-array/is) [:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array) [:running:](https://npm.runkit.com/@extra-array/is) [:vhs:](https://asciinema.org/a/332074) [:moon:](https://www.npmjs.com/package/@extra-array/is.min) [:scroll:](https://unpkg.com/@extra-array/is/) [:newspaper:](https://nodef.github.io/extra-array/) [:blue_book:](https://github.com/nodef/extra-array/wiki/) > This is part of package [extra-array]. [extra-array]: https://www.npmjs.com/package/extra-array <br> ```javascript array.is(v); // v: value ``` ```javascript const array = require("extra-array"); array.is([1, 2]); // true array.is([]); // true array.is(new Set([1, 2])); // false ``` <br> <br> ## References - [Array.isArray: MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) - [Array.isArray: sugarjs](https://sugarjs.com/docs/#/ES5/Array/isArray)