-
Notifications
You must be signed in to change notification settings - Fork 5
isEqual
Subhajit Sahu edited this page Mar 15, 2020
·
23 revisions
Compares two arrays.
array.compare(x, y, [fn]);
// x: an array
// y: another array
// fn: compare function (a, b)
// --> x<y: -1, x=y: 0, x>y: 1
const array = require('extra-array');
array.compare([1], [1, 2]);
// -1
array.compare([1, 2], [1, 2]);
// 0
array.compare([1, 2], [1, 1]);
// 1