Skip to content

Releases: lukeed/dequal

v2.0.3

11 Jul 23:30
Compare
Choose a tag to compare

Patches


Full Changelog: v2.0.2...v2.0.3

v2.0.2

19 Aug 04:26
Compare
Choose a tag to compare

Patches

v2.0.1

17 Aug 18:56
Compare
Choose a tag to compare

Patches

  • (types): Alter index.d.ts so that entry "mode" entry maintains type definition: 90f5eb9

Chores

  • (docs) Fix outdated import statement in README example (#13): f8443f5

v2.0.0

12 Aug 23:50
Compare
Choose a tag to compare

Breaking

  • Migrated from default to named export: 88f7ec5

    ESM/TypeScript

    - import dequal from 'dequal';
    + import { dequal } from 'dequal';

    CommonJS

    - const dequal = require('dequal');
    + const { dequal } = require('dequal');
  • Dropped Internet Explorer support
    If IE9+ support is still needed, please use the new dequal/lite entry (see below).
    The dequal/lite code is identical to dequal@1.x.

Features

  • Added ArrayBuffer and TypeArray support to dequal entry: cf14422

  • Added Map and Set support to dequal entry: ef34745, 0f081ab
    Set values, Map values, and Map keys use deep value equality.

    Example

    const foo = new Map([
      [{ abc: 123 }, 'value']
    ]);
    
    const bar = new Map([
      [{ abc: 123 }, 'value']
    ]);

    With referential equality, foo and bar are not equal. Even though they look identical, their { abc: 123 } key is not a shared reference. However, with value equality, foo and bar are equal. This is because their { abc: 123 } key holds the same value –– this follows how dequal and dequal/lite compare any other object.

  • Added native ESM support via exports mapping: 3533248
    Allows for Node.js import statements to work within native ESM resolvers.

  • Added dequal/lite mode: 81075b1
    Preserves dequal@1.x behaviors, allowing opt-in, continued IE support.
    Unlike the primary dequal offering, this mode does not & will not support Maps, Sets, TypedArray, etc.

Chores

v1.0.1

15 Jul 18:36
Compare
Choose a tag to compare

Patches

  • Support Object dictionaries: c8b3ace
  • Support custom Objects/Classes (#4, #5): 7d090f4
  • Do not use matching length for Array precondition: 4d76378

Chores