
Security News
TC39 Advances Temporal to Stage 4 Alongside Several ECMAScript Proposals
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.
shallowequal
Advanced tools
shallowequalis like lodash'sisEqualWithbut 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 is performed by iterating through keys on the given value, and returning false whenever any key has values which are not strictly equal between value and other. Otherwise, return true whenever the values of all keys are strictly equal.
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
$ yarn add shallowequal
# npm v5+
$ npm install shallowequal
# before npm v5
$ npm install --save shallowequal
const shallowequal = require('shallowequal');
const object = { 'user': 'fred' };
const other = { 'user': 'fred' };
object == other;
// → false
shallowequal(object, other);
// → true
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).
node.js and npm. See: https://github.com/creationix/nvm#installationyarn. See: https://yarnpkg.com/en/docs/installnpm dependencies. Run: yarn installyarn lintyarn testyarn prettyyarn prepublishMIT.
Lodash's isEqual method provides deep equality comparison, unlike shallowequal which only performs shallow comparisons. This makes lodash.isequal more suitable for scenarios where nested object properties need to be compared.
fast-deep-equal is another npm package that offers deep equality checks, similar to lodash.isequal but optimized for speed. It contrasts with shallowequal by providing deep comparison capabilities, which can be more comprehensive but potentially slower for simple use cases.
react-fast-compare is designed specifically for comparing React props and state objects efficiently. It performs deep equality checks and is optimized for React's use cases, making it different from shallowequal which only offers shallow comparison.
FAQs
Like lodash isEqualWith but for shallow equal.
The npm package shallowequal receives a total of 12,553,826 weekly downloads. As such, shallowequal popularity was classified as popular.
We found that shallowequal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.

Research
/Security News
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.