NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #817 most downloaded on npm
A blazing-fast equality comparison utility for a variety of use-cases
Last release today
03 Oct 2026
Ships unpredictably
gaps range from 8 days to 1.8 years
Nearly every release is documented
notes for 58 of 58 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
81 releases · first in 2017
[Enhancement] Specialize tagged object comparison when no custom comparator getter exists
strictNullPrototypeComparison configuration
option (thanks @erictheswift)getUnsupportedCustomComparator check for
tag-based comparisons when no getter is configured.One column per quarter.
[Enhancement] Optimize for null-prototype objects
Object.create(null)).[Maintenance] Update build tools
URL comparisons ignoring query strings. Query
parameter order remains insignificant, with repeated keys counted.Error comparisons ignoring own enumerable
properties.Error.cause to compare by value and added
circular reference tracking for errors.BigInt values to compare by value rather
than identity.TypedArray comparisons to treat NaN as equal
to itself, matching SameValueZero semantics.## 5.4.2[Security] Remove vulnerable packages
es-toolkit to benchmarks (#196) (75e6b28)[Enhancement] Micro-optimizations
[Enhancement] Drop UMD support and source maps
strictEqual method, and remove indirecton methods from equals.ts (#170) (5a566ff)AsyncGeneratorFunction in tag handlers (475fcfd)sameValueZeroEqual (#168) (3b9cabf)unsupportedTagComparators object in favor of
getUnsupportedCustomComparator methodsameValueEqual method (Object.is with ponyfill for legacy environments) and make it the default number
comparison (formerly used sameValueZeroEqual)strictEqual method for convenience and
completenessBigInt support added (uses same handlers as normal numbers)getUnsupportedCustomComparatorMerge branch 'main' of github.com:planttheidea/fast-equals into enhancement/drop-umd-support
sameValueZeroEqual (#168) (3b9cabf)update CHANGELOG to include other changes
update to latest build tools with consolidated types files
update to latest build tools beta
[Enhancement] Optimize for null-prototype objects
[Bugfix] Correctness issues
URL comparisons ignoring query strings. Query
parameter order remains insignificant, with repeated keys counted.Error comparisons ignoring own enumerable
properties.Error.cause to compare by value and added
circular reference tracking for errors.TypedArray comparisons to treat NaN as equal
to itself, matching SameValueZero semantics.length instead of byteLength to bound
TypedArray comparisons, avoiding redundant iterations on non-8-bit views.[Cleanup] Prevent v5 from being latest
[Fix] Improve handling of ArrayBuffer-based items
ArrayBuffer-based items (#163) (9664cad)TypedArray-based checks, and add
areArrayBuffersEqual and areDataViewsEqual to checks[Maintenance] Latest build tools
@planttheidea/build-tools package (#160) (8913015)[Feature] Swap webpack for vite
webpack for vite (#158) (eb1f004)jest for vitest (#157) (d66573b)remove allowImportTsExtensions option
allowImportTsExtensions option (a390612)jest for vitest (#157) (d66573b)Merge branch 'master' of github.com:planttheidea/fast-equals into issue-145/fix-typing-for-commonjs
.npmignore in favor of "files" declaration in package.json (#154) (24a7eb7).yarn folder (#153) (ace6f66)[Security] Resolve issues with implicit sub-dependencies
.npmignore in favor of "files" declaration in package.json (#154) (24a7eb7)* #151 - ignore .yarn folder
.yarn folder (#153) (ace6f66)Bump form-data from 4.0.1 to 4.0.4
.yarn files (47cf24b)node: prefix (#141) (078f427)assert.deepStrictEqual (57d1b0a)unknownTagComparators in custom
configuration (thanks to @mrcljx for the idea)update benchmarks and deps to latest
.d.cts / .d.mts output for files (37aadc9)fix extensions for mjs and cjs files
exports (fe355b7).d.ts extension (f8c9246).yarn files (47cf24b)node: prefix (#141) (078f427)assert.deepStrictEqual (57d1b0a)[Types] Allow ESM usage with "moduleResolution": "NodeNext"
"moduleResolution": "NodeNext" (#139) (7451bf0)NodeNext module resolutioncreate script that adds extensions to type files
[Types] Build flattened internal types instead of importing
src code in index.d.ts by
flattening types in filebuild flattened internal types instead of importing
fix version (make minor for Preact support)
* update CHANGELOG (dcce1bc) * [Iterables] Speed improvement (#136) (c0afd1b) * fix release:scripts command (6294b85) * [Benchmarks] Include dequal
release:scripts command (6294b85)dequal (#135) (32ccb67)Map / Set)
equality comparisonsdequal and dequal/lite in benchmark
comparisons* Clean up release setup
clean up prepublish and build folder in favor of release setup and config
DO NOT USE
This was an accidental pre-release when cleaning up release setup.
update README to highlight new custom equality methods
export type (#132) (80f616b)Function instance comparisons
(resolves #118)URL instance comparisons (resolves
#121)Error instance comparisons (resolves
#123)Number instance comparisons
(resolves #112)Bump webpack from 5.75.0 to 5.76.0
metaOverride (#100) (19327e5)metaOverride in typings and documentation (holdover from temporary API in v5 beta)Bump http-cache-semantics from 4.1.0 to 4.1.1
constructor equality now requiredTo align with other implementations common in the community, but also to be more functionally correct, the two objects
being compared now must have equal constructors.
Map / Set comparisons no longer support IE11In previous verisons, .forEach() was used to ensure that support for Symbol was not required, as IE11 did not have
Symbol and therefore both Map and Set did not have iterator-based methods such as .values() or .entries().
Since IE11 is no longer a supported browser, and support for those methods is present in all browsers and Node for quite
a while, the comparison has moved to use these methods. This results in a ~20% performance increase.
createCustomEqual contract has changedTo better facilitate strict comparisons, but also to allow for meta use separate from caching, the contract for
createCustomEqual has changed. See the README documentation for more details, but
froma high-level:
meta is no longer passed through to equality comparators, but rather a general state object which contains metacache now also lives on the state object, which allows for use of the meta property separate from but in
parallel with the circular cacheequals is now on state, which prevents the need to pass through the separate isEqual method for the equality
comparatorcreateCustomCircularEqual has been removedYou can create a custom circular equality comparator through createCustomEqual now by providing circular: true to
the options.
meta values are no longer passed at callsiteTo use meta properties for comparisons, they must be returned in a createState method.
If you were deep-linking into a specific asset type (ESM / CJS / UMD), they have changed location.
NOTE: You may no longer need to deep-link, as the build resolution has improved.
The following new comparators are available:
strictDeepEqualstrictShallowEqualstrictCircularDeepEqualstrictCircularShallowEqualThis will perform the same comparisons as their non-strict counterparts, but will verify additional properties
(non-enumerable properties on objects, keyed objects on Array / Map / Set) and that the descriptors for the
properties align.
TypedArray supportSupport for comparing all typed array values is now supported, and you can provide a custom comparator via the new
areTypedArraysEqual option in the createCustomEqual configuration.
The library now leverages the exports property in the package.json to provide builds specific to your method of
consumption (ESM / CommonJS / UMD). There is still a minified UMD version available if you want to use it instead.
arePrimitiveWrappersEqual option added to createCustomEqual configurationIf you want a custom comparator for primitive wrappers (new Boolean() / new Number() / new String()) it is now
available.
use iterator-based methods for Map / Set comparison
Map / Set comparison (48e6960)fast-deep-equal comparison to be more apples-to-apples (es6 + react) (bb57801)constructor equality checks (429170b)createCustomEqual options change (3857342)isTypedArray (058724a)null seems to be faster than ! (1f8aee9)simplify the description of support in README
areTypedArraysEqual check (319c4d6)put strict check after POJO check to fast-path a common use-case
constructor must match (a0d3e9c)isView instead of tag check (c2815f1)areTypedArraysEqual and call it out in CHANGELOG (c760179)BigInt64Array / BigUint64Array from type to make it easier for older consumers (but still support it at runtime) (afa2629)engines in package.json (1425f2f)restore simple config building, and avoid storage of entire options in createCustomEqual
options in createCustomEqual (688e933)createCustomEqual for all equality comparator constructions, and support better merging and circular handling (2a9e386)eliminate imports to runtime files in index.d.ts, per feedback
index.d.ts, per feedback (9f4878f)include index.d.ts fallback location
index.d.ts fallback location (6dbbd0d)Symbol keys in the documentation for strict checks (6cfa4cd)Add support for strict comparisons
arePrimitiveWrappersEqual overridecreateCustomEqual and createCustomCircularEqualRemove unnecessary strict equality check
Issue 85 incorrect custom comparator types
Fix type issues with additional strict options
flip to have index.d.ts be the complete types definition, and import from that file into src, to prevent imports in the definitions file
index.d.ts be the complete types definition, and import from that file into src, to prevent imports in the definitions file (4324386)centralize all types in types-only file, and simplify index.d.ts consumption
index.d.ts consumption (a3b479c)remove unnecessary include, which may be causing warning spam
include, which may be causing warning spam (446ca73)fix type issues with additional strict options
Due to the omnipresence of support in both browser and NodeJS, these have been deprecated. There is still an option if you require support for these l…
In previous versions, there were automatic fallbacks for certain ES2015 features if they did not exist:
Due to the omnipresence of support in both browser and NodeJS, these have been deprecated. There is still an option if
you require support for these legacy environments, however; see createCustomEqual and
createCustomCircularEqual for more details.
createCustomEqual contract has changedTo allow more flexibility and customizability for a variety of edge cases, createCustomEqual now allows override of
specific type value comparisons in addition to the general comparator it did prior. See
the documentation for more details.
createCustomCircularEqual addedLike createCustomEqual, it will create a custom equality comparator, with the exception that it will handle circular
references. See the documentation for more details.
Prior to 4.x.x., instanceof was used internally for checking of object classes, which only worked when comparing
objects from the same Realm. This has changed to instead use
an object's
StringTag, which
is not realm-specific.
For better typing in edge-case scenarios like custom comparators with meta values, typings have been refactored for
accuracy and better narrow flow-through.
clean up README and exposed typings
Meta (898a944)createCustomCircularEqual (7c71d93)areDatesEqual for complete coverage, in case someone wants a more targeted comparison (45a52c3)createCustomEqual (aeeb335)Map / Set iterations when already not-equal (eae8cc3)createCustomEqual to original contract (74c90d6)Issue 77 - circular reference naivete
Issue 73 - primitive wrapper support
RegExp comparisons (#76) (d3085e0)apply same generics to internals as externals
update CHANGELOG for breaking changes
When creating a custom equality comparator via createCustomEqual, the equality method has an expanded contract:
// Before
type EqualityComparator = (objectA: any, objectB: any, meta: any) => boolean;
// After
type InternalEqualityComparator = (
objectA: any,
objectB: any,
indexOrKeyA: any,
indexOrKeyB: any,
parentA: any,
parentB: any,
meta: any,
) => boolean;
If you have a custom equality comparator, you can ignore the differences by just passing additional undefined
parameters, or you can use the parameters to further improve / clarify the logic.
install release-it as a dev dependency
release-it as a dev dependency (043ccb0)__tests__/index.ts to avoid PR noise (54c5d42)areMapsEqual / areSetsEqual (7fa96eb)it.each for tests (1bff19c)utils.ts for scope (a0b21a8)Map / Set is compared (f2f7b89)Set support as well (05b8a48)* update CHANGELOG (8d99010) * Fix is cacheable check typo
Merge pull request #48 from planttheidea/reduce-variables-in-comparator
while loops (299c4d8)isNaN check (7101554)forEach (f9d3cfc)@rollup/plugin-node-resolve (60883d9)console.log (72c1f8d)Merge pull request #41 from herberttn/patch-1
.rpt2_cache directory from being published
for better CI environment support (thanks @herberttn)add build file for .mjs ESM usage
fast-equals/es, fast-equals/lib, fast-equals/mjs locations
dist for different consumption types:
fast-equals.js (UMD / browser)fast-equals.esm.js (ESM / module)fast-equals.cjs.js (CommonJS / main)import * as fe from 'fast-equalsMap / Set comparisonsObject.create(null)) to be plain objectscreateCustomEqualMerge pull request #27 from planttheidea/faster-iterable-size-comparisons
Your coding agent can read these notes before it upgrades. Set up the MCP server →