@extra-array/is-equal
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

Checks if two arrays are equal. 📦 😺 🏃 📼 🌔 📜 📰 📘

Similar: compare, isEqual.

This is part of package extra-array.


array.isEqual(x, y, [fc], [fm]);
// x:  an array
// y:  another array
// fc: compare function (a, b)
// fm: map function (v, i, x)
const array = require("extra-array");

var x = [1, 2];
array.isEqual(x, [1, 2]);
// true

array.isEqual(x, [11, 12]);
// false

array.isEqual(x, [11, 12], (a, b) => (a % 10) - (b % 10));
// true

array.isEqual(x, [11, 12], null, v => v % 10);
// true


References

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @extra-array/is-equal

      Weekly Downloads

      18

      Version

      2.10.19

      License

      MIT

      Unpacked Size

      5.16 kB

      Total Files

      8

      Last publish

      Collaborators

      • wolfram77