same-data
Deep equal with no deps and only for "data" objects, ie basic objects, arrays, primitives and typed arrays
npm install same-data
Designed to be simple and for data. Does NOT do anything magic for functions, symbols, recursive objects
Usage
const sameData = require('same-data')
console.log(sameData(1, 1))
console.log(sameData(1, 2))
console.log(sameData({ foo: 1 }, { foo: 1 }))
console.log(sameData({ foo: 1 }, { foo: 1, bar: true }))
console.log(sameData({ foo: 1, nested: { a: 1 } }, { foo: 1, nested: { a: 1 } }))
console.log(sameData([{ a: 1 }, { b: 1 }], [{ a: 1 }, { b: 1 }]))
License
MIT