loose-array-equals
v1.3.1
Published
Shallow check two arrays for loose equality
Downloads
20
Maintainers
Readme
loose-array-equals
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