Skip to content

`deep-equal`, but only for JSON-supported values.

License

Notifications You must be signed in to change notification settings

inspect-js/deep-equal-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deep-equal-json Version Badge

github actions coverage License Downloads

npm badge

deep-equal, but only for JSON-supported values.

Note that any results you get from values that do not round-trip through JSON.stringify and JSON.parse are explicitly not part of this API, and you must not rely on them.

Example

const assert = require('assert');
const deepEqual = require('deep-equal-json');

assert.equal(typeof deepEqual(a, b), 'boolean'); // `a` and `b` can be anything that roundtrips with JSON

Tests

Simply clone the repo, npm install, and run npm test