node-object-hash v2.0.0-rc.0 Release Notes
Release Date: 2019-09-03 // over 5 years ago-
โ BREAKING CHANGES
- Library rewritten in typescript that could cause some side-effects, but it should not.
- โช With
coerce=false
Set
s will no longer generate the same hashes asArray
s. In order to restore previous behavior setcoerce.set=true
. - With
coerce=false
Symbol
s will generate hash based on symbol.toString
value. That's useful forSymbol.for('smth')
. Ifcoerce.symbol=true
allSymbols
s will have equal hashes. TLDR; If you use library withSet
s orSymbol
s withcoerce=false
in order to keep hashes the same as inv1.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 viarequire('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
- hasher: fix options (05241ca)
๐ 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 instring
s orfunction
bodies. - ๐ Library rewritten to typescript, so it may have better ts compatibility.