Back
vendored
isarray
v2.0.5
MIT

isarray

The published isarray package as a vendorable file. Useful when you want the exact tiny fallback package behavior locally without keeping the npm dependency.

Why copy this?

This page ships the published isarray file in both raw and normalized forms. The value is not novelty; it is to keep an old but still sticky compatibility helper local and inspectable.

Native alternative: Array.isArray exists in modern runtimes, but some old codebases still carry this helper and may prefer to vendor the exact package behavior during cleanup.

Note: Raw and normalized views are both available. Use normalized when you want an ESM and TypeScript-friendly file, and raw when you want the original published package shape.

This copy is your responsibility once you adopt it. It does not automatically receive upstream bug fixes or security updates.

Snippet
Copy-first distribution
Normalized
ESM / TS / normalized
Runtime: node, bun
/**
 * Derived from isarray@2.0.5
 * Rule-based normalized variant generated by this repository.
 * Preserve the upstream license and attribution notices when copying this file.
 */
/**
 * Derived from isarray@2.0.5
 * Rule-based normalized variant generated by this repository.
 * See THIRD_PARTY_NOTICES.md for upstream license and attribution details.
 */
var toString = {}.toString;

export default Array.isArray ||
  function (arr) {
    return toString.call(arr) == "[object Array]";
  };
Variant note: Rule-based normalization for modern TS projects. The goal is easier import and build compatibility, not changed behavior.
Transforms: module.exports-to-export-default, js-extension-to-ts-extension
Validation: This normalized variant is intended to stay oxlint and oxfmt clean in this repo.
Raw
CJS / JS / raw
Runtime: node, bun
var toString = {}.toString;

module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};
Variant note: Published package file kept as-is for older teams or repos that still prefer the original CommonJS distribution.