JSPM

not-so-shallow

0.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8859
  • Score
    100M100P100Q11659F
  • License MIT

A less shallow `only-shallow`

Package Exports

  • not-so-shallow

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (not-so-shallow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

not-so-shallow

A less shallow only-shallow

Build Status

This is just only-shallow but with strict equality for value types.

Install

$ npm install --save not-so-shallow

Usage

let notSoShallow = require('not-so-shallow')

notSoShallow({a: 0}, {a: false}) // false
notSoShallow({a: 0}, {a: '0'}) // false
notSoShallow({a: 1}, {a: 1}) // true
notSoShallow({a: 1, b: 2}, {b: 2, a: 1}) // true

API

notSoShallow(a, b)

Returns true if a and b are the same according to the algorithm, which is explained in the comments of index.js.

License

MIT © Juan Soto