Package Exports
- hash-anything
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hash-anything) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
hash-anything
Hash any Javascript primitive or object using xxHash. xxHash is fast, but non-cryptographic, so do not use this module for security. It's for comparing, caching, indexing, etc.
Usage
var Hash = require('hash-anything').Hash;
var hash1 = new Hash()
.hash(1234)
.hash('some text')
.hash(new Date(2013, 1, 1))
.hash(567.89)
.hash(/regex/);
var hash2 = new Hash()
.hash(1234)
.hash('some text')
.hash(new Date(2013, 1, 1))
.hash(567.89)
.hash(/regex/);
console.log(hash1.getValue()); //3804156080
console.log(hash2.getValue()); //3804156080or
var hash = require('hash-anything').hash;
var hash1 = hash({
a: 1,
b: 2
});
var hash2 = hash({
a: 1,
b: 2
});
var hash3 = hash({
a: 1,
b: 2,
c: 3
});
console.log(hash1); //410437237
console.log(hash2); //410437237
console.log(hash3); //2822873007