🐊Putout plugin adds ability to apply Array.isArray()
npm install @putout/plugin-apply-is-array[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-is-array.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-is-array "npm"
> The Array.isArray() method determines whether the passed value is an Array.
> When checking for Array instance, Array.isArray() is preferred over instanceof because it works through iframes.
>
> (c) MDN
🐊Putout plugin adds ability to apply Array.isArray(). Fits good with @putout/plugin-declare. Merged to @putout/plugin-types.
```
npm i @putout/plugin-apply-is-array
`json`
{
"rules": {
"apply-is-array": "on"
}
}
`js`
x instanceof Array;
`js`
const {isArray} = Array;
isArray(x);
In case of using inline option:
`json`
{
"rules": {
"apply-is-array": ["on", {
"inline": true
}]
}
}
Array.isArray will be inlined:
`js``
Array.isArray(x);
MIT