/ archiveofbelonging.org / back / node_modules / @react-dnd / shallowequal /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/2 years ago -  
[DIR]src/2 years ago -  
[DIR]test/2 years ago -  
[   ]LICENSE40 years ago1.1K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[TXT]README.md40 years ago2.1Kf12eb36 documentaiton updates [كارل مبارك]
[   ]package.json2 years ago2.1K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[   ]tsconfig.json40 years ago740  
README.md

shallowequal Build Status Downloads npm version

shallowequal is like lodash's isEqual (v3.10.1) but for shallow (strict) equal.

shallowequal(value, other, [customizer], [thisArg])

Performs a shallow equality comparison between two values (i.e. value and other) to determine if they are equivalent.

The equality check returns true if value and other are already strictly equal, OR when all the following are true:

If customizer (expected to be a function) is provided it is invoked to compare values. If customizer returns undefined (i.e. void 0), then comparisons are handled by the shallowequal function instead.

The customizer is bound to thisArg and invoked with three arguments: (value, other, key).

NOTE: Docs are (shamelessly) adapted from lodash's v3.x docs

Install

$ yarn add shallowequal
# npm v5+
$ npm install shallowequal
# before npm v5
$ npm install --save shallowequal

Usage

const shallowequal = require("shallowequal");

const object = { user: "fred" };
const other = { user: "fred" };

object == other;
// → false

shallowequal(object, other);
// → true

Credit

Code for shallowEqual originated from https://github.com/gaearon/react-pure-render/ and has since been refactored to have the exact same API as lodash.isEqualWith (as of v4.17.4).

Development

Chores

License

MIT.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80