- Remove autocurrying of
hash.ismethods - Remove transpiled builds in favor of rollup distributed files (deep-linking will no longer work)
- Codebase rewritten in TypeScript
- Added
BigIntsupport
- Add TypeScript definitions
- Significant speed improvements
- Fix issues related to string encoding and collisions #23
- Improve speed of complex objects (Objects, Arrays, Maps, Sets)
- Fix security issue with old version of
webpack-dev-server
- Upgrade to use babel 7 for builds
- Fix #18 - IE11 not allowing global
toStringto be used, instead usingObject.prototype.toString(thanks @JorgenEvens)
- Remove unused values from publish
Rewrite! Lots of changes under-the-hood for a much more consistent hash, and circular object handling out of the box.
isEmpty,isEqual,isNull, andisUndefinedhave been removed (all can be reproduced with newisandis.allfunctions)hash.isNull=>hash.is(null)hash.isUndefined=>hash.is(undefined)hash.isEqual=>hash.is.allhash.isEmpty=>(object) => hash.is.any(object, undefined, null, '', 0, [], {}, new Map(), new Set())
Errorhashes now based onerror.stackinstead oferror.message
- Circular objects are now handled out of the box, thanks to
fast-stringify - Collision rates are near-zero (previously used traditional DJB2, which has small collision rates)
- Better
ArrayBuffersupport with the use ofBuffer.fromwhen supported - SVG elements, DocumentFragments, and Events are now supported
ispartial-application function allows for easy creation of any type ofisEqualcomparison methodis.anyperforms the same multiple-object check thatis.alldoes, but only checks if one of the other objects is equalis.notperforms the same comparison thatisdoes, but checks for non-equality
Object/Map/Setno longer returns different hashes based on order of key additionhash.isEqualwill no longer fail if nothing is passed
- Remove extraneous
toStringcall (performance)
- Improve hash uniqueness for HTML elements
- Add support for
Generator(not justGeneratorFunction) - Streamline
typeof- vstoString-driven handling for improved speed for most types
- Improve speed (2-4x faster depending on type)
- Smaller footprint (~25% reduction)
- Improve hash accuracy for functions (hash now includes function body)
- Fix issue where stack remained in memory after hash was built
- Add ES transpilation for module-ready build tools
- If using CommonJS, you need to specify
require('hash-it').defaultinstead of justrequire('hash-it') - Hashes themselves may have changed (especially for circular objects)
- Removed
isRecursivemethod onhashItobject (which was wrongly named to begin with)- To specifically handle circular objects (which is what it really did), pass
trueas the second parameter tohashIt
- To specifically handle circular objects (which is what it really did), pass
- Move up isNull check in replacer (improve performance of more likely use-case)
- Create isNull utility instead of checking strict equality in multiple places
- Overall speed improvement by an average of 18.74% (35.27% improvement on complex objects)
- More speed improvements
- Use JSON.stringify with replacer as default, without try/catch
- Move use of try/catch with fallback to prune to new
hashIt.withRecursionmethod (only necessary for deeply-recursive objects likewindow) - Reorder switch statement for commonality of use cases
- Leverage typeof in switch statements when possible for performance
- Add optimize-js plugin for performance in script version
- Add hashIt.isUndefined, hashIt.isNull, and hashIt.isEmpty methods
- Reorder switch statements in replacer and getValueForStringification to reflect most likely to least likely (improves performance a touch)
- Remove "Number" from number stringification
- Leverage prependTypeToString whereever possible
- Include Arguments object class
- Calculation of Math hashCode now uses properties
- Fix README
- Add hashIt.isEqual method to test for equality
- Prepend all values not string or number with object class name to help avoid collision with equivalent string values
- Add support for a variety of more object types
- Fix replacer not using same stringifier for int arrays
- Initial release