Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish v3.2.0 #240

Merged
merged 10 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.idea/**
.DS_Store
node_modules
package-lock.json
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Change Log

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.

<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)


### 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))


### Features

* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726))



# 3.0.1 (2016-11-28)

* split uuid versions into separate files
Expand Down Expand Up @@ -25,4 +45,3 @@
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
* Support for node.js crypto API
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code

56 changes: 14 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Features:
* 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
Expand All @@ -25,7 +28,7 @@ Version 1 (timestamp):

```javascript
const uuidv1 = require('uuid/v1');
uuidv1(); // ⇨ '47185630-f1a3-11e7-905e-bd5b5ba09b1f'
uuidv1(); // ⇨ '1c572360-faca-11e7-83ee-9d836d45ff41'

```

Expand Down Expand Up @@ -53,7 +56,7 @@ Version 4 (random):

```javascript
const uuidv4 = require('uuid/v4');
uuidv4(); // ⇨ 'b2857f0d-d2f4-46f0-9bf4-0dbcf0a13c1f'
uuidv4(); // ⇨ '45db52e1-f95c-4b5f-99a2-8b8d978c99b4'

```

Expand Down Expand Up @@ -164,8 +167,8 @@ Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
const arr = new Array();
uuidv1(null, arr, 0); // ⇨ [ 71, 30, 112, 176, 241, 163, 17, 231, 146, 52, 189, 91, 91, 160, 155, 31 ]
uuidv1(null, arr, 16); // ⇨ [ 71, 30, 112, 176, 241, 163, 17, 231, 146, 52, 189, 91, 91, 160, 155, 31, 71, 30, 151, 192, 241, 163, 17, 231, 146, 52, 189, 91, 91, 160, 155, 31 ]
uuidv1(null, arr, 0); // ⇨ [ 28, 97, 14, 112, 250, 202, 17, 231, 146, 52, 157, 131, 109, 69, 255, 65 ]
uuidv1(null, arr, 16); // ⇨ [ 28, 97, 14, 112, 250, 202, 17, 231, 146, 52, 157, 131, 109, 69, 255, 65, 28, 97, 53, 128, 250, 202, 17, 231, 146, 52, 157, 131, 109, 69, 255, 65 ]

```

Expand All @@ -192,15 +195,7 @@ Returns `buffer`, if specified, otherwise the string form of the UUID
Example:

```javascript
// Generate a unique namespace (typically you would do this once, outside of
// your project, then bake this value into your code)
const uuidv4 = require('uuid/v4');
const uuidv3 = require('uuid/v3');
const MY_NAMESPACE = uuidv4(); // ⇨ '029f3419-d770-48bc-8862-5efd8eef925d'

// Generate a couple namespace uuids
uuidv3('hello', MY_NAMESPACE); // ⇨ 'be216b77-2b79-3713-99af-a0add9d751f2'
uuidv3('world', MY_NAMESPACE); // ⇨ '834a3f0c-30bd-35f7-a090-c718e1db7c56'
uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424'

```

Expand Down Expand Up @@ -242,8 +237,8 @@ Example: Generate two IDs in a single buffer

```javascript
const buffer = new Array();
uuidv4(null, buffer, 0); // ⇨ [ 36, 127, 174, 168, 247, 125, 67, 114, 180, 253, 89, 117, 13, 63, 184, 208 ]
uuidv4(null, buffer, 16); // ⇨ [ 36, 127, 174, 168, 247, 125, 67, 114, 180, 253, 89, 117, 13, 63, 184, 208, 102, 253, 188, 241, 13, 225, 74, 91, 144, 239, 74, 141, 106, 12, 26, 70 ]
uuidv4(null, buffer, 0); // ⇨ [ 253, 175, 55, 222, 195, 132, 75, 162, 156, 105, 127, 104, 58, 195, 192, 66 ]
uuidv4(null, buffer, 16); // ⇨ [ 253, 175, 55, 222, 195, 132, 75, 162, 156, 105, 127, 104, 58, 195, 192, 66, 210, 238, 41, 99, 195, 139, 75, 146, 144, 79, 164, 48, 65, 180, 91, 48 ]

```

Expand All @@ -270,15 +265,7 @@ Returns `buffer`, if specified, otherwise the string form of the UUID
Example:

```javascript
// Generate a unique namespace (typically you would do this once, outside of
// your project, then bake this value into your code)
const uuidv4 = require('uuid/v4');
const uuidv5 = require('uuid/v5');
const MY_NAMESPACE = uuidv4(); // ⇨ 'e91f9e1b-ccfe-4eef-a9e0-7a0f4b229cb1'

// Generate a couple namespace uuids
uuidv5('hello', MY_NAMESPACE); // ⇨ 'c21bd5d3-295c-5d0f-8dee-b8d31738cd5c'
uuidv5('world', MY_NAMESPACE); // ⇨ '3ca60bff-5f02-5cd0-a973-747019bb671f'
uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b'

```

Expand All @@ -289,6 +276,9 @@ 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
Expand All @@ -299,23 +289,5 @@ Type `uuid --help` for usage details
npm test
```

## Deprecated API

The API below is available for legacy purposes and is not expected to be available post-3.X

```javascript
const uuid = require('uuid');

uuid.v1(...); // alias of uuid/v1
uuid.v4(...); // alias of uuid/v4
uuid(...); // alias of uuid/v4

// uuid.v5() is not supported in this API
```

## Legacy node-uuid package

The code for the legacy node-uuid package is available in the `node-uuid` branch.

----
Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
60 changes: 16 additions & 44 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Features:
* 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
Expand All @@ -23,7 +26,7 @@ Then generate your uuid version of choice ...

Version 1 (timestamp):

```javascript --run uuid
```javascript --run v1
const uuidv1 = require('uuid/v1');
uuidv1(); // RESULT
```
Expand All @@ -49,7 +52,7 @@ uuidv3('Hello, World!', MY_NAMESPACE); // RESULT

Version 4 (random):

```javascript --run uuid
```javascript --run v4
const uuidv4 = require('uuid/v4');
uuidv4(); // RESULT
```
Expand Down Expand Up @@ -144,7 +147,7 @@ Note: The <node> id is generated guaranteed to stay constant for the lifetime of

Example: Generate string UUID with fully-specified options

```javascript --run uuid
```javascript --run v1
const v1options = {
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
clockseq: 0x1234,
Expand All @@ -156,7 +159,7 @@ uuidv1(v1options); // RESULT

Example: In-place generation of two binary IDs

```javascript --run uuid
```javascript --run v1
// Generate two ids in an array
const arr = new Array();
uuidv1(null, arr, 0); // RESULT
Expand Down Expand Up @@ -185,16 +188,8 @@ Returns `buffer`, if specified, otherwise the string form of the UUID

Example:

```javascript --run
// Generate a unique namespace (typically you would do this once, outside of
// your project, then bake this value into your code)
const uuidv4 = require('uuid/v4');
const uuidv3 = require('uuid/v3');
const MY_NAMESPACE = uuidv4(); // RESULT

// Generate a couple namespace uuids
uuidv3('hello', MY_NAMESPACE); // RESULT
uuidv3('world', MY_NAMESPACE); // RESULT
```javascript --run v3
uuidv3('hello world', MY_NAMESPACE); // RESULT
```

### Version 4
Expand All @@ -220,7 +215,7 @@ Returns `buffer`, if specified, otherwise the string form of the UUID

Example: Generate string UUID with predefined `random` values

```javascript --run uuid
```javascript --run v4
const v4options = {
random: [
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
Expand All @@ -232,7 +227,7 @@ uuidv4(v4options); // RESULT

Example: Generate two IDs in a single buffer

```javascript --run uuid
```javascript --run v4
const buffer = new Array();
uuidv4(null, buffer, 0); // RESULT
uuidv4(null, buffer, 16); // RESULT
Expand Down Expand Up @@ -260,16 +255,8 @@ Returns `buffer`, if specified, otherwise the string form of the UUID

Example:

```javascript --run
// Generate a unique namespace (typically you would do this once, outside of
// your project, then bake this value into your code)
const uuidv4 = require('uuid/v4');
const uuidv5 = require('uuid/v5');
const MY_NAMESPACE = uuidv4(); // RESULT

// Generate a couple namespace uuids
uuidv5('hello', MY_NAMESPACE); // RESULT
uuidv5('world', MY_NAMESPACE); // RESULT
```javascript --run v5
uuidv5('hello world', MY_NAMESPACE); // RESULT
```

## Command Line
Expand All @@ -279,6 +266,9 @@ 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
Expand All @@ -288,21 +278,3 @@ Type `uuid --help` for usage details
```shell
npm test
```

## Deprecated API

The API below is available for legacy purposes and is not expected to be available post-3.X

```javascript
const uuid = require('uuid');

uuid.v1(...); // alias of uuid/v1
uuid.v4(...); // alias of uuid/v4
uuid(...); // alias of uuid/v4

// uuid.v5() is not supported in this API
```

## Legacy node-uuid package

The code for the legacy node-uuid package is available in the `node-uuid` branch.
Loading