JSPM

are-shallow-equal

2.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1425
  • Score
    100M100P100Q115235F
  • License MIT

Check if two values are shallowly equal to each other.

Package Exports

  • are-shallow-equal

Readme

Are Shallow Equal

Check if two values are shallowly equal to each other.

Install

npm install are-shallow-equal

Usage

import areShallowEqual from 'are-shallow-equal';

// Let's compare two values for shallow equality

areShallowEqual ( 123, 123 ); // true
areShallowEqual ( { foo: 1 }, { foo: 1 } ); // true
areShallowEqual ( [1, 2, 3], [1, 2, 3] ); // true

areShallowEqual ( 123, 456 ); // false
areShallowEqual ( { foo: 1 }, { foo: 2 } ); // false
areShallowEqual ( [1, 2, 3], [1, 2] ); // false

License

MIT © Fabio Spampinato