mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
use terser and clean-css directly
create a sourcemap as well by default
This commit is contained in:
47
node_modules/uuid/.eslintrc.json
generated
vendored
47
node_modules/uuid/.eslintrc.json
generated
vendored
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"node": true,
|
||||
"mocha": true
|
||||
},
|
||||
"extends": ["eslint:recommended"],
|
||||
"rules": {
|
||||
"array-bracket-spacing": ["warn", "never"],
|
||||
"arrow-body-style": ["warn", "as-needed"],
|
||||
"arrow-parens": ["warn", "as-needed"],
|
||||
"arrow-spacing": "warn",
|
||||
"brace-style": ["warn", "1tbs"],
|
||||
"camelcase": "warn",
|
||||
"comma-spacing": ["warn", {"after": true}],
|
||||
"dot-notation": "warn",
|
||||
"eqeqeq": ["warn", "smart"],
|
||||
"indent": ["warn", 2, {
|
||||
"SwitchCase": 1,
|
||||
"FunctionDeclaration": {"parameters": 1},
|
||||
"MemberExpression": 1,
|
||||
"CallExpression": {"arguments": 1}
|
||||
}],
|
||||
"key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
|
||||
"keyword-spacing": "warn",
|
||||
"no-console": "off",
|
||||
"no-empty": "off",
|
||||
"no-multi-spaces": "warn",
|
||||
"no-redeclare": "off",
|
||||
"no-restricted-globals": ["warn", "Promise"],
|
||||
"no-trailing-spaces": "warn",
|
||||
"no-undef": "error",
|
||||
"no-unused-vars": ["warn", {"args": "none"}],
|
||||
"one-var": ["warn", "never"],
|
||||
"padded-blocks": ["warn", "never"],
|
||||
"object-curly-spacing": ["warn", "never"],
|
||||
"quotes": ["warn", "single"],
|
||||
"react/prop-types": "off",
|
||||
"react/jsx-no-bind": "off",
|
||||
"semi": ["warn", "always"],
|
||||
"space-before-blocks": ["warn", "always"],
|
||||
"space-before-function-paren": ["warn", "never"],
|
||||
"space-in-parens": ["warn", "never"]
|
||||
}
|
||||
}
|
45
node_modules/uuid/CHANGELOG.md
generated
vendored
45
node_modules/uuid/CHANGELOG.md
generated
vendored
@@ -1,69 +1,78 @@
|
||||
# Change Log
|
||||
# Changelog
|
||||
|
||||
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.
|
||||
|
||||
## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 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)
|
||||
|
||||
### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
|
||||
|
||||
<a name="3.3.2"></a>
|
||||
## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
|
||||
## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877))
|
||||
* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
|
||||
|
||||
|
||||
|
||||
<a name="3.3.1"></a>
|
||||
## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
|
||||
## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 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))
|
||||
* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
|
||||
|
||||
|
||||
|
||||
<a name="3.3.0"></a>
|
||||
# [3.3.0](https://github.com/kelektiv/node-uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
|
||||
# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 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))
|
||||
* fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4))
|
||||
* Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331))
|
||||
* mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c))
|
||||
* 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))
|
||||
* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
|
||||
* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
|
||||
* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
|
||||
|
||||
### Features
|
||||
|
||||
* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182))
|
||||
* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
|
||||
|
||||
|
||||
<a name="3.2.1"></a>
|
||||
## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
|
||||
## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 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))
|
||||
* 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))
|
||||
|
||||
|
||||
|
||||
<a name="3.2.0"></a>
|
||||
# [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
|
||||
# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824))
|
||||
* 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))
|
||||
* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
|
||||
* 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))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726))
|
||||
* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
|
||||
|
||||
|
||||
# [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
|
||||
# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
77
node_modules/uuid/README.md
generated
vendored
77
node_modules/uuid/README.md
generated
vendored
@@ -28,7 +28,7 @@ Version 1 (timestamp):
|
||||
|
||||
```javascript
|
||||
const uuidv1 = require('uuid/v1');
|
||||
uuidv1(); // ⇨ '45745c60-7b1a-11e8-9c9c-2d42b21b1a3e'
|
||||
uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
|
||||
|
||||
```
|
||||
|
||||
@@ -56,7 +56,7 @@ Version 4 (random):
|
||||
|
||||
```javascript
|
||||
const uuidv4 = require('uuid/v4');
|
||||
uuidv4(); // ⇨ '10ba038e-48da-487b-96e8-8d3b99b6d18a'
|
||||
uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
|
||||
|
||||
```
|
||||
|
||||
@@ -80,46 +80,6 @@ uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614
|
||||
|
||||
```
|
||||
|
||||
## Quickstart - Browser-ready Versions
|
||||
|
||||
Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
|
||||
|
||||
For version 1 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv1@latest"></script>
|
||||
<script>
|
||||
uuidv1(); // -> v1 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 3 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv3@latest"></script>
|
||||
<script>
|
||||
uuidv3('http://example.com/hello', uuidv3.URL); // -> v3 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 4 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv4@latest"></script>
|
||||
<script>
|
||||
uuidv4(); // -> v4 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 5 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv5@latest"></script>
|
||||
<script>
|
||||
uuidv5('http://example.com/hello', uuidv5.URL); // -> v5 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Version 1
|
||||
@@ -147,7 +107,7 @@ Generate and return a RFC4122 v1 (timestamp-based) UUID.
|
||||
|
||||
Returns `buffer`, if specified, otherwise the string form of the UUID
|
||||
|
||||
Note: The <node> id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
|
||||
Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
|
||||
|
||||
Example: Generate string UUID with fully-specified options
|
||||
|
||||
@@ -167,8 +127,19 @@ Example: In-place generation of two binary IDs
|
||||
```javascript
|
||||
// Generate two ids in an array
|
||||
const arr = new Array();
|
||||
uuidv1(null, arr, 0); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ]
|
||||
uuidv1(null, arr, 16); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62, 69, 117, 109, 209, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ]
|
||||
uuidv1(null, arr, 0); // ⇨
|
||||
// [
|
||||
// 44, 94, 164, 192, 64, 103,
|
||||
// 17, 233, 146, 52, 155, 29,
|
||||
// 235, 77, 59, 125
|
||||
// ]
|
||||
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
|
||||
// ]
|
||||
|
||||
```
|
||||
|
||||
@@ -237,8 +208,20 @@ Example: Generate two IDs in a single buffer
|
||||
|
||||
```javascript
|
||||
const buffer = new Array();
|
||||
uuidv4(null, buffer, 0); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45 ]
|
||||
uuidv4(null, buffer, 16); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45, 108, 204, 255, 103, 171, 86, 76, 94, 178, 225, 188, 236, 150, 20, 151, 87 ]
|
||||
uuidv4(null, buffer, 0); // ⇨
|
||||
// [
|
||||
// 155, 29, 235, 77, 59,
|
||||
// 125, 75, 173, 155, 221,
|
||||
// 43, 13, 123, 61, 203,
|
||||
// 109
|
||||
// ]
|
||||
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
|
||||
// ]
|
||||
|
||||
```
|
||||
|
||||
|
280
node_modules/uuid/README_js.md
generated
vendored
280
node_modules/uuid/README_js.md
generated
vendored
@@ -1,280 +0,0 @@
|
||||
```javascript --hide
|
||||
runmd.onRequire = path => path.replace(/^uuid/, './');
|
||||
```
|
||||
|
||||
# uuid [](http://travis-ci.org/kelektiv/node-uuid) #
|
||||
|
||||
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
|
||||
|
||||
Features:
|
||||
|
||||
* Support for version 1, 3, 4 and 5 UUIDs
|
||||
* Cross-platform
|
||||
* Uses cryptographically-strong random number APIs (when available)
|
||||
* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883))
|
||||
|
||||
[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be
|
||||
supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.]
|
||||
|
||||
## Quickstart - CommonJS (Recommended)
|
||||
|
||||
```shell
|
||||
npm install uuid
|
||||
```
|
||||
|
||||
Then generate your uuid version of choice ...
|
||||
|
||||
Version 1 (timestamp):
|
||||
|
||||
```javascript --run v1
|
||||
const uuidv1 = require('uuid/v1');
|
||||
uuidv1(); // RESULT
|
||||
```
|
||||
|
||||
Version 3 (namespace):
|
||||
|
||||
```javascript --run v3
|
||||
const uuidv3 = require('uuid/v3');
|
||||
|
||||
// ... using predefined DNS namespace (for domain names)
|
||||
uuidv3('hello.example.com', uuidv3.DNS); // RESULT
|
||||
|
||||
// ... using predefined URL namespace (for, well, URLs)
|
||||
uuidv3('http://example.com/hello', uuidv3.URL); // RESULT
|
||||
|
||||
// ... using a custom namespace
|
||||
//
|
||||
// Note: Custom namespaces should be a UUID string specific to your application!
|
||||
// E.g. the one here was generated using this modules `uuid` CLI.
|
||||
const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
|
||||
uuidv3('Hello, World!', MY_NAMESPACE); // RESULT
|
||||
```
|
||||
|
||||
Version 4 (random):
|
||||
|
||||
```javascript --run v4
|
||||
const uuidv4 = require('uuid/v4');
|
||||
uuidv4(); // RESULT
|
||||
```
|
||||
|
||||
Version 5 (namespace):
|
||||
|
||||
```javascript --run v5
|
||||
const uuidv5 = require('uuid/v5');
|
||||
|
||||
// ... using predefined DNS namespace (for domain names)
|
||||
uuidv5('hello.example.com', uuidv5.DNS); // RESULT
|
||||
|
||||
// ... using predefined URL namespace (for, well, URLs)
|
||||
uuidv5('http://example.com/hello', uuidv5.URL); // RESULT
|
||||
|
||||
// ... using a custom namespace
|
||||
//
|
||||
// Note: Custom namespaces should be a UUID string specific to your application!
|
||||
// E.g. the one here was generated using this modules `uuid` CLI.
|
||||
const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
|
||||
uuidv5('Hello, World!', MY_NAMESPACE); // RESULT
|
||||
```
|
||||
|
||||
## Quickstart - Browser-ready Versions
|
||||
|
||||
Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
|
||||
|
||||
For version 1 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv1@latest"></script>
|
||||
<script>
|
||||
uuidv1(); // -> v1 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 3 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv3@latest"></script>
|
||||
<script>
|
||||
uuidv3('http://example.com/hello', uuidv3.URL); // -> v3 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 4 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv4@latest"></script>
|
||||
<script>
|
||||
uuidv4(); // -> v4 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
For version 5 uuids:
|
||||
|
||||
```html
|
||||
<script src="http://wzrd.in/standalone/uuid%2Fv5@latest"></script>
|
||||
<script>
|
||||
uuidv5('http://example.com/hello', uuidv5.URL); // -> v5 UUID
|
||||
</script>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Version 1
|
||||
|
||||
```javascript
|
||||
const uuidv1 = require('uuid/v1');
|
||||
|
||||
// Incantations
|
||||
uuidv1();
|
||||
uuidv1(options);
|
||||
uuidv1(options, buffer, offset);
|
||||
```
|
||||
|
||||
Generate and return a RFC4122 v1 (timestamp-based) UUID.
|
||||
|
||||
* `options` - (Object) Optional uuid state to apply. Properties may include:
|
||||
|
||||
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
|
||||
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
|
||||
* `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used.
|
||||
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
|
||||
|
||||
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
||||
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
|
||||
|
||||
Returns `buffer`, if specified, otherwise the string form of the UUID
|
||||
|
||||
Note: The <node> id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
|
||||
|
||||
Example: Generate string UUID with fully-specified options
|
||||
|
||||
```javascript --run v1
|
||||
const v1options = {
|
||||
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
|
||||
clockseq: 0x1234,
|
||||
msecs: new Date('2011-11-01').getTime(),
|
||||
nsecs: 5678
|
||||
};
|
||||
uuidv1(v1options); // RESULT
|
||||
```
|
||||
|
||||
Example: In-place generation of two binary IDs
|
||||
|
||||
```javascript --run v1
|
||||
// Generate two ids in an array
|
||||
const arr = new Array();
|
||||
uuidv1(null, arr, 0); // RESULT
|
||||
uuidv1(null, arr, 16); // RESULT
|
||||
```
|
||||
|
||||
### Version 3
|
||||
|
||||
```javascript
|
||||
const uuidv3 = require('uuid/v3');
|
||||
|
||||
// Incantations
|
||||
uuidv3(name, namespace);
|
||||
uuidv3(name, namespace, buffer);
|
||||
uuidv3(name, namespace, buffer, offset);
|
||||
```
|
||||
|
||||
Generate and return a RFC4122 v3 UUID.
|
||||
|
||||
* `name` - (String | Array[]) "name" to create UUID with
|
||||
* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
|
||||
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
||||
* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
|
||||
|
||||
Returns `buffer`, if specified, otherwise the string form of the UUID
|
||||
|
||||
Example:
|
||||
|
||||
```javascript --run v3
|
||||
uuidv3('hello world', MY_NAMESPACE); // RESULT
|
||||
```
|
||||
|
||||
### Version 4
|
||||
|
||||
```javascript
|
||||
const uuidv4 = require('uuid/v4')
|
||||
|
||||
// Incantations
|
||||
uuidv4();
|
||||
uuidv4(options);
|
||||
uuidv4(options, buffer, offset);
|
||||
```
|
||||
|
||||
Generate and return a RFC4122 v4 UUID.
|
||||
|
||||
* `options` - (Object) Optional uuid state to apply. Properties may include:
|
||||
* `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
|
||||
* `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255)
|
||||
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
||||
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
|
||||
|
||||
Returns `buffer`, if specified, otherwise the string form of the UUID
|
||||
|
||||
Example: Generate string UUID with predefined `random` values
|
||||
|
||||
```javascript --run v4
|
||||
const v4options = {
|
||||
random: [
|
||||
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
|
||||
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
|
||||
]
|
||||
};
|
||||
uuidv4(v4options); // RESULT
|
||||
```
|
||||
|
||||
Example: Generate two IDs in a single buffer
|
||||
|
||||
```javascript --run v4
|
||||
const buffer = new Array();
|
||||
uuidv4(null, buffer, 0); // RESULT
|
||||
uuidv4(null, buffer, 16); // RESULT
|
||||
```
|
||||
|
||||
### Version 5
|
||||
|
||||
```javascript
|
||||
const uuidv5 = require('uuid/v5');
|
||||
|
||||
// Incantations
|
||||
uuidv5(name, namespace);
|
||||
uuidv5(name, namespace, buffer);
|
||||
uuidv5(name, namespace, buffer, offset);
|
||||
```
|
||||
|
||||
Generate and return a RFC4122 v5 UUID.
|
||||
|
||||
* `name` - (String | Array[]) "name" to create UUID with
|
||||
* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
|
||||
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
||||
* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
|
||||
|
||||
Returns `buffer`, if specified, otherwise the string form of the UUID
|
||||
|
||||
Example:
|
||||
|
||||
```javascript --run v5
|
||||
uuidv5('hello world', MY_NAMESPACE); // RESULT
|
||||
```
|
||||
|
||||
## Command Line
|
||||
|
||||
UUIDs can be generated from the command line with the `uuid` command.
|
||||
|
||||
```shell
|
||||
$ uuid
|
||||
ddeb27fb-d9a0-4624-be4d-4615062daed4
|
||||
|
||||
$ uuid v1
|
||||
02d37060-d446-11e7-a9fa-7bdae751ebe1
|
||||
```
|
||||
|
||||
Type `uuid --help` for usage details
|
||||
|
||||
## Testing
|
||||
|
||||
```shell
|
||||
npm test
|
||||
```
|
18
node_modules/uuid/lib/bytesToUuid.js
generated
vendored
18
node_modules/uuid/lib/bytesToUuid.js
generated
vendored
@@ -11,14 +11,16 @@ function bytesToUuid(buf, offset) {
|
||||
var i = offset || 0;
|
||||
var bth = byteToHex;
|
||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
||||
return ([bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]]]).join('');
|
||||
return ([
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]]
|
||||
]).join('');
|
||||
}
|
||||
|
||||
module.exports = bytesToUuid;
|
||||
|
41
node_modules/uuid/package.json
generated
vendored
41
node_modules/uuid/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "uuid@^3.3.2",
|
||||
"_id": "uuid@3.3.2",
|
||||
"_id": "uuid@3.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
|
||||
"_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"_location": "/uuid",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -18,12 +18,12 @@
|
||||
"_requiredBy": [
|
||||
"/request"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"_shasum": "1b4af4955eb3077c501c23872fc6513811587131",
|
||||
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"_shasum": "b23e4358afa8a202fe7a100af1f5f883f02007ee",
|
||||
"_spec": "uuid@^3.3.2",
|
||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\request",
|
||||
"bin": {
|
||||
"uuid": "./bin/uuid"
|
||||
"uuid": "bin/uuid"
|
||||
},
|
||||
"browser": {
|
||||
"./lib/rng.js": "./lib/rng-browser.js",
|
||||
@@ -31,7 +31,7 @@
|
||||
"./lib/md5.js": "./lib/md5-browser.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kelektiv/node-uuid/issues"
|
||||
"url": "https://github.com/uuidjs/uuid/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"commitlint": {
|
||||
@@ -64,15 +64,20 @@
|
||||
"deprecated": false,
|
||||
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "7.0.0",
|
||||
"@commitlint/config-conventional": "7.0.1",
|
||||
"eslint": "4.19.1",
|
||||
"husky": "0.14.3",
|
||||
"mocha": "5.2.0",
|
||||
"runmd": "1.0.1",
|
||||
"standard-version": "4.4.0"
|
||||
"@commitlint/cli": "~8.2.0",
|
||||
"@commitlint/config-conventional": "~8.2.0",
|
||||
"eslint": "~6.4.0",
|
||||
"husky": "~3.0.5",
|
||||
"mocha": "6.2.0",
|
||||
"runmd": "1.2.1",
|
||||
"standard-version": "7.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/uuidjs/uuid#readme",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/kelektiv/node-uuid#readme",
|
||||
"keywords": [
|
||||
"uuid",
|
||||
"guid",
|
||||
@@ -82,14 +87,14 @@
|
||||
"name": "uuid",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kelektiv/node-uuid.git"
|
||||
"url": "git+https://github.com/uuidjs/uuid.git"
|
||||
},
|
||||
"scripts": {
|
||||
"commitmsg": "commitlint -E GIT_PARAMS",
|
||||
"lint": "eslint .",
|
||||
"md": "runmd --watch --output=README.md README_js.md",
|
||||
"prepare": "runmd --output=README.md README_js.md",
|
||||
"release": "standard-version",
|
||||
"test": "mocha test/test.js"
|
||||
"test": "npm run lint && mocha test/test.js"
|
||||
},
|
||||
"version": "3.3.2"
|
||||
"version": "3.4.0"
|
||||
}
|
||||
|
2
node_modules/uuid/v1.js
generated
vendored
2
node_modules/uuid/v1.js
generated
vendored
@@ -13,7 +13,7 @@ var _clockseq;
|
||||
var _lastMSecs = 0;
|
||||
var _lastNSecs = 0;
|
||||
|
||||
// See https://github.com/broofa/node-uuid for API details
|
||||
// See https://github.com/uuidjs/uuid for API details
|
||||
function v1(options, buf, offset) {
|
||||
var i = buf && offset || 0;
|
||||
var b = buf || [];
|
||||
|
Reference in New Issue
Block a user