is-deep-eq

2.1.1 • Public • Published

is-deep-eq


Check if two arrays, objects, numbers or strings are equal.

Install


Install with npm:

$ npm install --save is-deep-eq

Usage

var isDeepEqual = require("is-deep-eq");

console.log(isDeepEqual([1, 2, 3], [1, 2, 3]));
// => true

console.log(isDeepEqual({ key1: "val1" }, { key1: "val1" }));
// => true

console.log(isDeepEqual({ key1: 1 }, { key1: "1" }));
// => false

console.log(isDeepEqual(1, 2));
// => false

console.log(isDeepEqual([{ key1: "val" }], [{ key1: "val" }]));
// => true

console.log(isDeepEqual({ key1: [1, 2, 3] }, { key1: [1, 2, 3] }));
// => true

console.log(isDeepEqual(undefined, undefined));
// => true

console.log(isDeepEqual(undefined, {}));
// => false

License


Released under the MIT License.

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i is-deep-eq

    Weekly Downloads

    2

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    4.04 kB

    Total Files

    4

    Last publish

    Collaborators

    • koraygocmen