JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36876F
  • License MIT

Shallow check two arrays for loose equality

Package Exports

  • loose-array-equals

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (loose-array-equals) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

loose-array-equals

npm XO code style Build Status codecov

Shallow check two arrays for loose equality using the ECMAScript Abstract Equality Comparison Algorithm, i.e. double equals (==).

Installation

npm install --save loose-array-equals

Usage

const looseArrayEquals = require('loose-array-equals');

looseArrayEquals(['a', '23'], ['a', 23]);  // true
looseArrayEquals([1, !![], !!{}, 0], [true, true, true, false]); //true
looseArrayEquals(['a', 23], [23, 'a']);  // false
looseArrayEquals(['a', 23], [42]); // false