Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hash-it

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-it - npm Package Versions

13

4.0.3

Diff

Changelog

Source

4.0.3

  • Upgrade to use babel 7 for builds
planttheidea
published 4.0.2 •

Changelog

Source

4.0.2

  • Fix #18 - IE11 not allowing global toString to be used, instead using Object.prototype.toString (thanks @JorgenEvens)
planttheidea
published 4.0.1 •

Changelog

Source

4.0.1

  • Remove unused values from publish
planttheidea
published 4.0.0 •

Changelog

Source

4.0.0

Rewrite! Lots of changes under-the-hood for a much more consistent hash, and circular object handling out of the box.

BREAKING CHANGES
  • isEmpty, isEqual,isNull, and isUndefined have been removed (all can be reproduced with new is and is.all functions)
    • hash.isNull => hash.is(null)
    • hash.isUndefined => hash.is(undefined)
    • hash.isEqual => hash.is.all
    • hash.isEmpty => (object) => hash.is.any(object, undefined, null, '', 0, [], {}, new Map(), new Set())
  • Error hashes now based on error.stack instead of error.message
ENHANCEMENTS
  • 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 ArrayBuffer support with the use of Buffer.from when supported
  • SVG elements, DocumentFragments, and Events are now supported
  • is partial-application function allows for easy creation of any type of isEqual comparison method
  • is.any performs the same multiple-object check that is.all does, but only checks if one of the other objects is equal
  • is.not performs the same comparison that is does, but checks for non-equality
FIXES
  • Object / Map / Set no longer returns different hashes based on order of key addition
  • hash.isEqual will no longer fail if nothing is passed
planttheidea
published 3.1.2 •

Changelog

Source

3.1.2

  • Remove extraneous toString call (performance)
planttheidea
published 3.1.1 •

Changelog

Source

3.1.1

  • Improve hash uniqueness for HTML elements
planttheidea
published 3.1.0 •

Changelog

Source

3.1.0

  • Add support for Generator (not just GeneratorFunction)
  • Streamline typeof- vs toString-driven handling for improved speed for most types
planttheidea
published 3.0.0 •

Changelog

Source

3.0.0

  • 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
BREAKING CHANGES
  • If using CommonJS, you need to specify require('hash-it').default instead of just require('hash-it')
  • Hashes themselves may have changed (especially for circular objects)
  • Removed isRecursive method on hashIt object (which was wrongly named to begin with)
    • To specifically handle circular objects (which is what it really did), pass true as the second parameter to hashIt
planttheidea
published 2.1.2 •

Changelog

Source

2.1.2

  • Move up isNull check in replacer (improve performance of more likely use-case)
planttheidea
published 2.1.1 •

Changelog

Source

2.1.1

  • Create isNull utility instead of checking strict equality in multiple places
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc