uuid-by-string 3.0.1 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -23,19 +23,19 @@ The package has only one default exported method. Method receives any string and
|
|
|
23
23
|
const getUuid = require('uuid-by-string')
|
|
24
24
|
|
|
25
25
|
const uuidHash = getUuid('Hello world!')
|
|
26
|
-
// d3486ae9-136e-
|
|
26
|
+
// d3486ae9-136e-5856-bc42-212385ea7970
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
The string `Hello world!` will always returns `d3486ae9-136e-
|
|
29
|
+
The string `Hello world!` will always returns `d3486ae9-136e-5856-bc42-212385ea7970`.
|
|
30
30
|
|
|
31
31
|
You can specify the UUID version. Available versions is 3 and 5 according to [RFC-4122](https://tools.ietf.org/html/rfc4122#section-4.3). The version is responsible for the hashing algorithm: version 3 uses MD5, and version 5 uses SHA-1. SHA-1 used by default if version is not specified.
|
|
32
32
|
|
|
33
33
|
```js
|
|
34
34
|
const uuidV3Hash = getUuid('Hello world!', 3)
|
|
35
|
-
// 86fb269d-190d-
|
|
35
|
+
// 86fb269d-190d-3c85-b6e0-468ceca42a20
|
|
36
36
|
|
|
37
37
|
const uuidV5Hash = getUuid('Hello world!', 5)
|
|
38
|
-
// d3486ae9-136e-
|
|
38
|
+
// d3486ae9-136e-5856-bc42-212385ea7970
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## License
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uuid-by-string",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Generating uuid-hash from string",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "jest"
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"prepublishOnly": "jest"
|
|
9
10
|
},
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
@@ -42,6 +43,6 @@
|
|
|
42
43
|
"js-sha1": "^0.6.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"jest": "^
|
|
46
|
+
"jest": "^27.0.1"
|
|
46
47
|
}
|
|
47
48
|
}
|