Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including deep-equal with all npm packages installed. Try it out:

var deepEqual = require("deep-equal")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

deep-equal v2.0.1

node's assert.deepEqual algorithm


Node's assert.deepEqual() algorithm as a standalone module.

This module is around 46 times faster than wrapping assert.deepEqual() in a try/catch.

build status


var equal = require('deep-equal');
        { a : [ 2, 3 ], b : [ 4 ] },
        { a : [ 2, 3 ], b : [ 4 ] }
        { x : 5, y : [6] },
        { x : 5, y : 6 }


var deepEqual = require('deep-equal')

deepEqual(a, b, opts)

Compare objects a and b, returning whether they are equal according to a recursive equality algorithm.

If opts.strict is true, use strict equality (===) to compare leaf nodes. The default is to use coercive equality (==) because that's how assert.deepEqual() works by default.


With npm do:

npm install deep-equal


With npm do:

npm test


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free