x-is-array is a lightweight, single-purpose JavaScript utility designed solely to determine if a given value is an array. It is currently at version 0.1.0 and, given its stable and minimal functionality, does not follow a frequent release cadence, as its core logic is well-established and rarely requires updates. Its key differentiator is its explicit existence as a standalone npm package for environments where a dedicated import might be preferred over direct usage of the built-in `Array.isArray()`, though they achieve the same result. It's often used in older CommonJS environments or as a simple dependency in utility libraries. This package serves as a direct alternative to `Array.isArray()` for compatibility or stylistic reasons in specific project setups.
npm install x-is-arrayVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use `x-is-array` to check various data types for array status, including type narrowing.
Replace `import isArray from 'x-is-array';` with direct usage of `Array.isArray()` or `const isArray = Array.isArray;` for consistency.
For optimal performance in critical sections, use the native `Array.isArray()` method directly.
Evaluate project needs; for a simple array check, the lack of updates is often not an issue, but consider alternatives if active maintenance is a strict requirement.
Ensure `isArray` is imported as a default export: `import isArray from 'x-is-array';` in ESM or `const isArray = require('x-is-array');` in CommonJS.If in an ES Module file (`.mjs` or `type: "module"` in `package.json`), use `import isArray from 'x-is-array';`. If in a browser, ensure a bundler like Webpack or Rollup is configured to handle CommonJS modules.
No dependency data recorded yet.