5.0 KiB
5.0 KiB
fast-equals CHANGELOG
3.0.3
- Fix #77 - better circular object validation
3.0.2
- Fix #73 - support comparison of primitive wrappers
- #76 - improve speed and accuracy of
RegExpcomparison in modern environments
3.0.1
- Fix #71 - use generic types for better type flow-through
3.0.0
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.
- Add #57 - support additional metadata for custom equality comparators
2.0.4
- Fix #58 - duplicate entries in
Map/Setcan create false equality success - #60 - Add documentation for key equality of
Mapbeing a part ofdeepEqual
2.0.3
- Fix #50 - copy-pasta in cacheable check
2.0.2
- Optimize iterables comparisons to not double-iterate
- Optimize loop-based comparisons for speed
- Improve cache handling in circular handlers
- Improve stability of memory by reducing variable instantiation
2.0.1
- Fix #41 - prevent
.rpt2_cachedirectory from being published for better CI environment support (thanks @herberttn)
2.0.0
Breaking changes
- There are longer
fast-equals/es,fast-equals/lib,fast-equals/mjslocations- Instead, there are 3 builds in
distfor different consumption types:fast-equals.js(UMD /browser)fast-equals.esm.js(ESM /module)fast-equals.cjs.js(CommonJS /main)
- Instead, there are 3 builds in
- There is no default export anymore, only the previously-existing named exports
- To get all into a namespace, use
import * as fe from 'fast-equals
- To get all into a namespace, use
Updates
- Rewritten completely in TypeScript
- Improve speed of
Map/Setcomparisons - Improve speed of React element comparisons
Fixes
- Consider pure objects (
Object.create(null)) to be plain objects - Fix typings for
createCustomEqual
1.6.3
- Check the size of the iterable before converting to arrays
1.6.2
- Fix #23 - false positives for map
- Replace
uglifywithterser - Use
rollupto build all the distributables (main,module, andbrowser)- Maintain
libandestranspilations in case consumers were deep-linking
- Maintain
1.6.1
- Upgrade to
babel@7 - Add
"sideEffects": falsetopackage.jsonfor better tree-shaking inwebpack
1.6.0
- Add ESM support for NodeJS with separate
.mjsextension exports
1.5.3
- Fix
Map/Setcomparison to not require order to match to be equal
1.5.2
- Improve speed of object comparison through custom
hasKeymethod
1.5.1
- Fix lack of support for
unicodeandstickyRegExp flag checks
1.5.0
- Add
circularDeepEqualandcircularShallowEqualmethods - Add
metathird parameter tocomparatorcalls, for use withcreateCustomEqualmethod
1.4.1
- Fix issue where
lastIndexwas not being tested onRegExpobjects
1.4.0
- Add support for comparing promise-like objects (strict equality only)
1.3.1
- Make
reactcomparison more accurate, and a touch faster
1.3.0
- Add support for deep-equal comparisons between
reactelements - Add comparison with
react-fast-compare - Use
rollupfordistfile builds
1.2.1
- Fix errors from TypeScript typings in strict mode (thanks @HitoriSensei)
1.2.0
- Surface
isSameValueZeroassameValueZeroEqualoption
1.1.0
- Add TypeScript typings (thanks @josh-sachs)
1.0.6
- Support invalid date equality via
isSameValueZero
1.0.5
- Replace
isStrictlyEqualwithisSameValueZeroto ensure thatshallowEqualaccounts forNaNequality
1.0.4
- Only check values when comparing
Setobjects (improves performance ofSetcheck by ~12%)
1.0.3
- Make
MapandSetcomparisons more explicit
1.0.2
- Fix symmetrical comparison of iterables
- Reduce footprint
1.0.1
- Prevent babel transpilation of
typeofinto helper for faster runtime
1.0.0
- Initial release