All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
2.3.10 (2021-09-14)
- deps: update (996e344)
2.3.9 (2021-08-18)
2.3.8 (2021-07-31)
2.3.7 (2021-06-17)
- update links (f48c0c9)
2.3.6 (2021-06-17)
- update jest types (b1a7774)
2.3.5 (2021-06-17)
- deps: update (d16d2b2)
- revert ts to 4.2 (6423ea7)
2.3.4 (2021-06-14)
2.3.3 (2021-05-29)
2.3.2 (2021-05-28)
2.3.1 (2021-02-28)
- add tests for every possible option (0fc56f0)
2.3.0 (2021-02-24)
- add sorting option for typed arrays (28d5344)
- stringification of typed arrays (bc1e1a6)
2.2.0 (2021-02-22)
- add bigint support (544d97e)
- coerce option for bigint (ca2f87c)
- typo in doc (d9d7e24)
- typos: fix typos in test and contributing.md (2ee3ddd)
2.1.2 (2021-01-29)
2.1.1 (2021-01-29)
- added warnings to eslint errors (422c893)
- fixed eslint errors (e9245f7)
- fixed npm script issue (0bf8c17)
- updated typescript, migrated to tslint (3a40fcc)
- remove unnecessary checks (1bbad3a)
- lint: fix eslint (caeac70)
- types: fix encoding type (cdc6958)
- improve checking of Hashable applicant (3856207)
2.0.0 (2019-09-07)
2.0.0-rc.1 (2019-09-03)
2.0.0-rc.0 (2019-09-03)
- 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.
- hasher: fix options (05241ca)
- 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.
- Add support for objects without constructor #11 PR @futpib
- Simplify eslint rules, update codestyle
- Fix npm links issues in readme
- Update dev dependencies
- Add definition types to support typescript
- Add >=node-8.0.0 support in tests.
- Added typed arrays support
- Added primitive type constructors support
- Add more docs about type mapping and type coercion
Mainly all changes affected codestyle and documentation to provide better experience using this library. There are no changes that should affect functionality.
- Renamed
sortObject
function tosort
(old one is still present in code for backward compatibility). - Performed some refactoring for better codestyle and documentation.
- Old version (
0.X.X
) moved to subfolder (./v0
). - Advanced API reference added: link.
- Sorting mechanism rewritten form ES6 Maps to simple arrays (add <=node-4.0.0 support)
- Performance optimization (~2 times faster than 0.x.x)
- API changes:
- Now module returns 'constructor' function, where you can set
default parameters:
var objectHash = require('node-object-hash')(options);
- Now module returns 'constructor' function, where you can set
default parameters:
In case if you still need an old 0.x.x version it's available in hash.js
file.