@extra-array/equal

1.1.7 • Public • Published

Check if array is equal to another array.

const equal = require('@extra-array/equal');
// equal(<array 1>, <array 2>, [begin 1=0], [end 1], [begin 2=0], [end 2])

var a = ['l', 'o', 's', 't'];
var b = ['b', 'o', 's', 's']
equal(a, b);
// false (lost !== boss)
equal(a, b, 1);
// false (ost !== boss)
equal(a, b, 1, 3);
// false (os !== boss)
equal(a, b, 1, 3, 1);
// false (os !== oss)
equal(a, b, 1, 3, 1, 3);
// true (os === os)

With extra-array try Array.equal() instead.


extra-array

Package Sidebar

Install

npm i @extra-array/equal

Weekly Downloads

76

Version

1.1.7

License

MIT

Unpacked Size

2.68 kB

Total Files

4

Last publish

Collaborators

  • wolfram77