Socket
Socket
Sign inDemoInstall

not-so-shallow

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    not-so-shallow

A less shallow `only-shallow`


Version published
Weekly downloads
1.4K
decreased by-3.35%
Maintainers
1
Install size
11.1 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 12 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc