UNPKG

1.2 kBMarkdownView Raw
1# hash-sum
2
3> blazing fast unique hash generator
4
5# install
6
7```shell
8npm i hash-sum -S
9```
10
11# `sum(value)`
12
13yields a four-byte hexadecimal hash based off of `value`.
14
15```
16# creates unique hashes
17 creates unique hashes
184d237d49 from: [ 0, 1, 2, 3 ]
19766ec173 from: { url: 12 }
202f473108 from: { headers: 12 }
2123308836 from: { headers: 122 }
22062bce44 from: { headers: '122' }
23acb9f66e from: { headers: { accept: 'text/plain' } }
241c365a2d from: { payload: [ 0, 1, 2, 3 ], headers: [ { a: 'b' } ] }
257319ae9d from: { a: [Function] }
268a3a0e86 from: { b: [Function] }
27b6d7f5d4 from: { b: [Function] }
286c95fc65 from: function () {}
292941766e from: function (a) {}
30294f8def from: function (b) {}
312d9c0cb8 from: function (a) { return a;}
32ed5c63fc from: function (a) {return a;}
33bba68bf6 from: ''
342d27667d from: 'null'
35774b96ed from: 'false'
362d2a1684 from: 'true'
378daa1a0c from: '0'
388daa1a0a from: '1'
39e38f07cc from: 'void 0'
406037ea1a from: 'undefined'
419b7df12e from: null
423c206f76 from: false
4301e34ba8 from: true
441a96284a from: 0
451a96284b from: 1
4629172c1a from: undefined
474505230f from: {}
483718c6e8 from: { a: {}, b: {} }
49caec4ca8 from: { b: {}, a: {} }
505d844489 from: []
51ok 1 should be equal
52```
53
54# license
55
56MIT