Skip to content
Eugene Lazutkin edited this page Jan 19, 2022 · 10 revisions

deep6 is a no-dependency ES6 mini-library:

  • Advanced deep equivalency for JavaScript structures.
    • Extensible to accommodate custom objects.
  • Traversing objects.
    • Extensible deep cloning.
  • Written in ES6:
    • Use it in Node or browsers without transpiling.
    • Natively supports Map, Set, typed arrays.
    • Natively supports symbols and property descriptors.
    • Presented as ES6 modules, yet provides CommonJS modules for convenience.
  • Efficient non-recursive algorithms.
    • ~500 tests to ensure correctness.
    • Support for circular dependencies.
    • Support for "loose" comparisons.
  • Unification.
    • Identifying and capturing object fragments.

The library is written as a collection of ES6 modules. For convenience, and to support older versions of Node, it provides a collection of CommonJS (require()-style) modules as well.

Documentation

Most popular functions available from the main module as named properties:

Advanced functionality:

Background

It is the next generation of heya-unify, which basic concepts were explained and demonstrated in the following blog posts:

Clone this wiki locally