uuid 3.2.0 → 3.2.1

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,6 +2,16 @@
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
+ <a name="3.2.1"></a>
6
+ ## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.1) (2018-01-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * 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))
12
+
13
+
14
+
5
15
  <a name="3.2.0"></a>
6
16
  # [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
7
17
 
package/README.md CHANGED
@@ -28,7 +28,7 @@ Version 1 (timestamp):
28
28
 
29
29
  ```javascript
30
30
  const uuidv1 = require('uuid/v1');
31
- uuidv1(); // ⇨ 'cd4b78f0-facb-11e7-8ab9-db97a89e6c61'
31
+ uuidv1(); // ⇨ 'f64f2940-fae4-11e7-8c5f-ef356f279131'
32
32
 
33
33
  ```
34
34
 
@@ -56,7 +56,7 @@ Version 4 (random):
56
56
 
57
57
  ```javascript
58
58
  const uuidv4 = require('uuid/v4');
59
- uuidv4(); // ⇨ '50fcd19b-5302-4b7b-97fd-92cabead0a6d'
59
+ uuidv4(); // ⇨ '416ac246-e7ac-49ff-93b4-f7e94d997e6b'
60
60
 
61
61
  ```
62
62
 
@@ -167,8 +167,8 @@ Example: In-place generation of two binary IDs
167
167
  ```javascript
168
168
  // Generate two ids in an array
169
169
  const arr = new Array();
170
- uuidv1(null, arr, 0); // ⇨ [ 205, 84, 121, 160, 250, 203, 17, 231, 146, 52, 219, 151, 168, 158, 108, 97 ]
171
- uuidv1(null, arr, 16); // ⇨ [ 205, 84, 121, 160, 250, 203, 17, 231, 146, 52, 219, 151, 168, 158, 108, 97, 205, 84, 160, 176, 250, 203, 17, 231, 146, 52, 219, 151, 168, 158, 108, 97 ]
170
+ uuidv1(null, arr, 0); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
171
+ uuidv1(null, arr, 16); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49, 246, 87, 180, 192, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
172
172
 
173
173
  ```
174
174
 
@@ -237,8 +237,8 @@ Example: Generate two IDs in a single buffer
237
237
 
238
238
  ```javascript
239
239
  const buffer = new Array();
240
- uuidv4(null, buffer, 0); // ⇨ [ 67, 176, 245, 14, 66, 213, 76, 211, 160, 194, 254, 30, 190, 20, 195, 236 ]
241
- uuidv4(null, buffer, 16); // ⇨ [ 67, 176, 245, 14, 66, 213, 76, 211, 160, 194, 254, 30, 190, 20, 195, 236, 25, 78, 246, 100, 115, 188, 70, 66, 185, 84, 18, 78, 23, 254, 174, 151 ]
240
+ uuidv4(null, buffer, 0); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250 ]
241
+ uuidv4(null, buffer, 16); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250, 75, 162, 105, 153, 48, 238, 77, 58, 169, 56, 158, 207, 106, 160, 47, 239 ]
242
242
 
243
243
  ```
244
244
 
@@ -3,8 +3,9 @@
3
3
  // and inconsistent support for the `crypto` API. We do the best we can via
4
4
  // feature-detection
5
5
 
6
- var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues) ||
7
- (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues);
6
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
7
+ var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
8
+ (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
8
9
  if (getRandomValues) {
9
10
  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
10
11
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uuid",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
5
  "keywords": [
6
6
  "uuid",