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 1,000,000+ packages pre-installed, including deep-is with all npm packages installed. Try it out:

var deepIs = require("deep-is")

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

deep-is v0.1.3

node's assert.deepEqual algorithm except for NaN being equal to NaN


Node's assert.deepEqual() algorithm as a standalone module. Exactly like deep-equal except for the fact that deepEqual(NaN, NaN) === true.

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

browser support

build status


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


var deepIs = require('deep-is')

deepIs(a, b)

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


With npm do:

npm install deep-is


With npm do:

npm test


Copyright (c) 2012, 2013 Thorsten Lorenz Copyright (c) 2012 James Halliday

Derived largely from node's assert module, which has the copyright statement:

Copyright (c) 2009 Thomas Robinson <>

Released under the MIT license, see LICENSE for details.


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