1 | # hash-sum
|
2 |
|
3 | > blazing fast unique hash generator
|
4 |
|
5 | # install
|
6 |
|
7 | ```shell
|
8 | npm i hash-sum -S
|
9 | ```
|
10 |
|
11 | # `sum(value)`
|
12 |
|
13 | yields a four-byte hexadecimal hash based off of `value`.
|
14 |
|
15 | ```
|
16 | # creates unique hashes
|
17 | creates unique hashes
|
18 | 4d237d49 from: [ 0, 1, 2, 3 ]
|
19 | 766ec173 from: { url: 12 }
|
20 | 2f473108 from: { headers: 12 }
|
21 | 23308836 from: { headers: 122 }
|
22 | 062bce44 from: { headers: '122' }
|
23 | acb9f66e from: { headers: { accept: 'text/plain' } }
|
24 | 1c365a2d from: { payload: [ 0, 1, 2, 3 ], headers: [ { a: 'b' } ] }
|
25 | 7319ae9d from: { a: [Function] }
|
26 | 8a3a0e86 from: { b: [Function] }
|
27 | b6d7f5d4 from: { b: [Function] }
|
28 | 6c95fc65 from: function () {}
|
29 | 2941766e from: function (a) {}
|
30 | 294f8def from: function (b) {}
|
31 | 2d9c0cb8 from: function (a) { return a;}
|
32 | ed5c63fc from: function (a) {return a;}
|
33 | bba68bf6 from: ''
|
34 | 2d27667d from: 'null'
|
35 | 774b96ed from: 'false'
|
36 | 2d2a1684 from: 'true'
|
37 | 8daa1a0c from: '0'
|
38 | 8daa1a0a from: '1'
|
39 | e38f07cc from: 'void 0'
|
40 | 6037ea1a from: 'undefined'
|
41 | 9b7df12e from: null
|
42 | 3c206f76 from: false
|
43 | 01e34ba8 from: true
|
44 | 1a96284a from: 0
|
45 | 1a96284b from: 1
|
46 | 29172c1a from: undefined
|
47 | 4505230f from: {}
|
48 | 3718c6e8 from: { a: {}, b: {} }
|
49 | caec4ca8 from: { b: {}, a: {} }
|
50 | 5d844489 from: []
|
51 | ok 1 should be equal
|
52 | ```
|
53 |
|
54 | # license
|
55 |
|
56 | MIT
|