uuid 3.3.3 → 3.4.0

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/CHANGELOG.md CHANGED
@@ -2,70 +2,77 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [3.3.3](https://github.com/kelektiv/node-uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
5
+ ## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
11
+
12
+ ### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
6
13
 
7
14
  <a name="3.3.2"></a>
8
- ## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
15
+ ## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
9
16
 
10
17
 
11
18
  ### Bug Fixes
12
19
 
13
- * typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877))
20
+ * typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
14
21
 
15
22
 
16
23
 
17
24
  <a name="3.3.1"></a>
18
- ## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
25
+ ## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
19
26
 
20
27
 
21
28
  ### Bug Fixes
22
29
 
23
- * fix [#284](https://github.com/kelektiv/node-uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/kelektiv/node-uuid/commit/f2a60f2))
30
+ * fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
24
31
 
25
32
 
26
33
 
27
34
  <a name="3.3.0"></a>
28
- # [3.3.0](https://github.com/kelektiv/node-uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
35
+ # [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
29
36
 
30
37
 
31
38
  ### Bug Fixes
32
39
 
33
- * assignment to readonly property to allow running in strict mode ([#270](https://github.com/kelektiv/node-uuid/issues/270)) ([d062fdc](https://github.com/kelektiv/node-uuid/commit/d062fdc))
34
- * fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4))
35
- * Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331))
36
- * mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c))
40
+ * assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))
41
+ * fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
42
+ * Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
43
+ * mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
37
44
 
38
45
  ### Features
39
46
 
40
- * enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182))
47
+ * enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
41
48
 
42
49
 
43
50
  <a name="3.2.1"></a>
44
- ## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
51
+ ## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
45
52
 
46
53
 
47
54
  ### Bug Fixes
48
55
 
49
- * use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b))
56
+ * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
50
57
 
51
58
 
52
59
 
53
60
  <a name="3.2.0"></a>
54
- # [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
61
+ # [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
55
62
 
56
63
 
57
64
  ### Bug Fixes
58
65
 
59
- * remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824))
60
- * use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b))
66
+ * remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
67
+ * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
61
68
 
62
69
 
63
70
  ### Features
64
71
 
65
- * Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726))
72
+ * Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
66
73
 
67
74
 
68
- # [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
75
+ # [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
69
76
 
70
77
  ### Bug Fixes
71
78
 
package/README.md CHANGED
@@ -80,46 +80,6 @@ uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614
80
80
 
81
81
  ```
82
82
 
83
- ## Quickstart - Browser-ready Versions
84
-
85
- Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
86
-
87
- For version 1 uuids:
88
-
89
- ```html
90
- <script src="http://wzrd.in/standalone/uuid%2Fv1@latest"></script>
91
- <script>
92
- uuidv1(); // -> v1 UUID
93
- </script>
94
- ```
95
-
96
- For version 3 uuids:
97
-
98
- ```html
99
- <script src="http://wzrd.in/standalone/uuid%2Fv3@latest"></script>
100
- <script>
101
- uuidv3('http://example.com/hello', uuidv3.URL); // -> v3 UUID
102
- </script>
103
- ```
104
-
105
- For version 4 uuids:
106
-
107
- ```html
108
- <script src="http://wzrd.in/standalone/uuid%2Fv4@latest"></script>
109
- <script>
110
- uuidv4(); // -> v4 UUID
111
- </script>
112
- ```
113
-
114
- For version 5 uuids:
115
-
116
- ```html
117
- <script src="http://wzrd.in/standalone/uuid%2Fv5@latest"></script>
118
- <script>
119
- uuidv5('http://example.com/hello', uuidv5.URL); // -> v5 UUID
120
- </script>
121
- ```
122
-
123
83
  ## API
124
84
 
125
85
  ### Version 1
@@ -167,8 +127,19 @@ Example: In-place generation of two binary IDs
167
127
  ```javascript
168
128
  // Generate two ids in an array
169
129
  const arr = new Array();
170
- uuidv1(null, arr, 0); // ⇨ [ 44, 94, 164, 192, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125 ]
171
- uuidv1(null, arr, 16); // [ 44, 94, 164, 192, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125, 44, 94, 164, 193, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125 ]
130
+ uuidv1(null, arr, 0); // ⇨
131
+ // [
132
+ // 44, 94, 164, 192, 64, 103,
133
+ // 17, 233, 146, 52, 155, 29,
134
+ // 235, 77, 59, 125
135
+ // ]
136
+ uuidv1(null, arr, 16); // ⇨
137
+ // [
138
+ // 44, 94, 164, 192, 64, 103, 17, 233,
139
+ // 146, 52, 155, 29, 235, 77, 59, 125,
140
+ // 44, 94, 164, 193, 64, 103, 17, 233,
141
+ // 146, 52, 155, 29, 235, 77, 59, 125
142
+ // ]
172
143
 
173
144
  ```
174
145
 
@@ -237,8 +208,20 @@ Example: Generate two IDs in a single buffer
237
208
 
238
209
  ```javascript
239
210
  const buffer = new Array();
240
- uuidv4(null, buffer, 0); // ⇨ [ 155, 29, 235, 77, 59, 125, 75, 173, 155, 221, 43, 13, 123, 61, 203, 109 ]
241
- uuidv4(null, buffer, 16); // [ 155, 29, 235, 77, 59, 125, 75, 173, 155, 221, 43, 13, 123, 61, 203, 109, 27, 157, 107, 205, 187, 253, 75, 45, 155, 93, 171, 141, 251, 189, 75, 237 ]
211
+ uuidv4(null, buffer, 0); // ⇨
212
+ // [
213
+ // 155, 29, 235, 77, 59,
214
+ // 125, 75, 173, 155, 221,
215
+ // 43, 13, 123, 61, 203,
216
+ // 109
217
+ // ]
218
+ uuidv4(null, buffer, 16); // ⇨
219
+ // [
220
+ // 155, 29, 235, 77, 59, 125, 75, 173,
221
+ // 155, 221, 43, 13, 123, 61, 203, 109,
222
+ // 27, 157, 107, 205, 187, 253, 75, 45,
223
+ // 155, 93, 171, 141, 251, 189, 75, 237
224
+ // ]
242
225
 
243
226
  ```
244
227
 
@@ -11,14 +11,16 @@ function bytesToUuid(buf, offset) {
11
11
  var i = offset || 0;
12
12
  var bth = byteToHex;
13
13
  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
14
- return ([bth[buf[i++]], bth[buf[i++]],
15
- bth[buf[i++]], bth[buf[i++]], '-',
16
- bth[buf[i++]], bth[buf[i++]], '-',
17
- bth[buf[i++]], bth[buf[i++]], '-',
18
- bth[buf[i++]], bth[buf[i++]], '-',
19
- bth[buf[i++]], bth[buf[i++]],
20
- bth[buf[i++]], bth[buf[i++]],
21
- bth[buf[i++]], bth[buf[i++]]]).join('');
14
+ return ([
15
+ bth[buf[i++]], bth[buf[i++]],
16
+ bth[buf[i++]], bth[buf[i++]], '-',
17
+ bth[buf[i++]], bth[buf[i++]], '-',
18
+ bth[buf[i++]], bth[buf[i++]], '-',
19
+ bth[buf[i++]], bth[buf[i++]], '-',
20
+ bth[buf[i++]], bth[buf[i++]],
21
+ bth[buf[i++]], bth[buf[i++]],
22
+ bth[buf[i++]], bth[buf[i++]]
23
+ ]).join('');
22
24
  }
23
25
 
24
26
  module.exports = bytesToUuid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uuid",
3
- "version": "3.3.3",
3
+ "version": "3.4.0",
4
4
  "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
5
  "commitlint": {
6
6
  "extends": [
@@ -17,17 +17,17 @@
17
17
  "uuid": "./bin/uuid"
18
18
  },
19
19
  "devDependencies": {
20
- "@commitlint/cli": "8.1.0",
21
- "@commitlint/config-conventional": "8.1.0",
22
- "eslint": "6.2.0",
23
- "husky": "3.0.4",
20
+ "@commitlint/cli": "~8.2.0",
21
+ "@commitlint/config-conventional": "~8.2.0",
22
+ "eslint": "~6.4.0",
23
+ "husky": "~3.0.5",
24
24
  "mocha": "6.2.0",
25
25
  "runmd": "1.2.1",
26
26
  "standard-version": "7.0.0"
27
27
  },
28
28
  "scripts": {
29
- "commitmsg": "commitlint -E HUSKY_GIT_PARAMS",
30
- "test": "mocha test/test.js",
29
+ "lint": "eslint .",
30
+ "test": "npm run lint && mocha test/test.js",
31
31
  "md": "runmd --watch --output=README.md README_js.md",
32
32
  "release": "standard-version",
33
33
  "prepare": "runmd --output=README.md README_js.md"
@@ -39,6 +39,11 @@
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
42
- "url": "https://github.com/kelektiv/node-uuid.git"
42
+ "url": "https://github.com/uuidjs/uuid.git"
43
+ },
44
+ "husky": {
45
+ "hooks": {
46
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
47
+ }
43
48
  }
44
49
  }
package/v1.js CHANGED
@@ -13,7 +13,7 @@ var _clockseq;
13
13
  var _lastMSecs = 0;
14
14
  var _lastNSecs = 0;
15
15
 
16
- // See https://github.com/broofa/node-uuid for API details
16
+ // See https://github.com/uuidjs/uuid for API details
17
17
  function v1(options, buf, offset) {
18
18
  var i = buf && offset || 0;
19
19
  var b = buf || [];