node-object-hash v2.0.0-rc.0 Release Notes

Release Date: 2019-09-03 // about 4 years ago

    • Library rewritten in typescript that could cause some side-effects, but it should not.
    • โช With coerce=false Sets will no longer generate the same hashes as Arrays. In order to restore previous behavior set coerce.set=true.
    • With coerce=false Symbols will generate hash based on symbol .toString value. That's useful for Symbol.for('smth'). If coerce.symbol=true all Symbolss will have equal hashes. TLDR; If you use library with Sets or Symbols with coerce=false in order to keep hashes the same as in v1.X.X you should use following constructor: const hasher = require('node-object-hash')({coerce: {set: true, symbol: true}})
    • ๐Ÿšš Object sorter sources moved to dist directory. If you required it directly via require('node-object-hash/objectSorter') you should change it to require('node-object-hash/dist/objectSorter').
    • โœ‚ Removed old v0 version from code.
    • ๐Ÿ”„ Changed license to MIT.

    ๐Ÿ› Bug Fixes

    ๐Ÿ”‹ Features

    • ๐Ÿ”จ major refactor (450471e)
    • ๐Ÿ†• New granular options. Now you can specify what types need to be sorted or coerced.
    • โž• Add new trim option. It can be used to remove unncecessary spaces in strings or function bodies.
    • ๐Ÿ‘ Library rewritten to typescript, so it may have better ts compatibility.