Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-equals

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-equals - npm Package Versions

1245

3.0.1

Diff

Changelog

Source

3.0.1

  • Fix #71 - use generic types for better type flow-through
planttheidea
published 3.0.0 •

Changelog

Source

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
planttheidea
published 2.0.4 •

Changelog

Source

2.0.4

  • Fix #58 - duplicate entries in Map / Set can create false equality success
  • #60 - Add documentation for key equality of Map being a part of deepEqual
planttheidea
published 2.0.3 •

Changelog

Source

2.0.3

  • Fix #50 - copy-pasta in cacheable check
planttheidea
published 2.0.2 •

Changelog

Source

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
planttheidea
published 2.0.1 •

Changelog

Source

2.0.1

  • Fix #41 - prevent .rpt2_cache directory from being published for better CI environment support (thanks @herberttn)
planttheidea
published 2.0.0 •

Changelog

Source

2.0.0

Breaking changes

  • There are longer fast-equals/es, fast-equals/lib, fast-equals/mjs locations
    • Instead, there are 3 builds in dist for different consumption types:
      • fast-equals.js (UMD / browser)
      • fast-equals.esm.js (ESM / module)
      • fast-equals.cjs.js (CommonJS / main)
  • 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

Updates

  • Rewritten completely in TypeScript
  • Improve speed of Map / Set comparisons
  • Improve speed of React element comparisons

Fixes

  • Consider pure objects (Object.create(null)) to be plain objects
  • Fix typings for createCustomEqual
planttheidea
published 1.6.3 •

Changelog

Source

1.6.3

  • Check the size of the iterable before converting to arrays
planttheidea
published 1.6.2 •

Changelog

Source

1.6.2

  • Fix #23 - false positives for map
  • Replace uglify with terser
  • Use rollup to build all the distributables (main, module, and browser)
    • Maintain lib and es transpilations in case consumers were deep-linking
planttheidea
published 1.6.1 •

Changelog

Source

1.6.1

  • Upgrade to babel@7
  • Add "sideEffects": false to package.json for better tree-shaking in webpack
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc