uuid 8.3.2-beta.0 → 8.3.2

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,12 @@
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
+ ### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)
6
+
7
+ ### Bug Fixes
8
+
9
+ - lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536)
10
+
5
11
  ### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04)
6
12
 
7
13
  ### Bug Fixes
package/README.md CHANGED
@@ -296,6 +296,23 @@ uuidValidate('not a UUID'); // ⇨ false
296
296
  uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true
297
297
  ```
298
298
 
299
+ Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds.
300
+
301
+ ```javascript
302
+ import { version as uuidVersion } from 'uuid';
303
+ import { validate as uuidValidate } from 'uuid';
304
+
305
+ function uuidValidateV4(uuid) {
306
+ return uuidValidate(uuid) && uuidVersion(uuid) === 4;
307
+ }
308
+
309
+ const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210';
310
+ const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836';
311
+
312
+ uuidValidateV4(v4Uuid); // ⇨ true
313
+ uuidValidateV4(v1Uuid); // ⇨ false
314
+ ```
315
+
299
316
  ### uuid.version(str)
300
317
 
301
318
  Detect RFC version of a UUID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uuid",
3
- "version": "8.3.2-beta.0",
3
+ "version": "8.3.2",
4
4
  "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
5
  "commitlint": {
6
6
  "extends": [