-
Notifications
You must be signed in to change notification settings - Fork 1
isEqual
Subhajit Sahu edited this page May 10, 2020
·
22 revisions
Checks if two iterables are equal. 🏃 [:vhs:] 📦 🌔
iterable.isEqual(x, y, [fn]);
// x: an iterable
// y: another iterable
// fn: compare function (a, b)
const iterable = require('extra-iterable');
var x = [1, 2];
iterable.isEqual(x, [1, 2]);
// true
iterable.isEqual(x, [11, 12]);
// false
iterable.isEqual(x, [11, 12], (a, b) => (a % 10) - (b % 10));
// true