Socket
Socket
Sign inDemoInstall

uuid

Package Overview
Dependencies
0
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.1 to 3.3.0

64

CHANGELOG.md

@@ -5,4 +5,20 @@ # Change Log

<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)
### 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))
### 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))
<a name="3.2.1"></a>
## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.1) (2018-01-16)
## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16)

@@ -12,6 +28,15 @@

* 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))
* 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
* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182))
<a name="3.2.0"></a>

@@ -32,29 +57,46 @@ # [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16)

# [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
### Bug Fixes
* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
* Fix typo (#178)
* Simple typo fix (#165)
### Features
* v5 support in CLI (#197)
* V5 support (#188)
# 3.0.1 (2016-11-28)
* split uuid versions into separate files
* split uuid versions into separate files
# 3.0.0 (2016-11-17)
* remove .parse and .unparse
* remove .parse and .unparse
# 2.0.0
* Removed uuid.BufferClass
* Removed uuid.BufferClass
# 1.4.0
* Improved module context detection
* Removed public RNG functions
* Improved module context detection
* Removed public RNG functions
# 1.3.2
* Improve tests and handling of v1() options (Issue #24)
* Expose RNG option to allow for perf testing with different generators
* Improve tests and handling of v1() options (Issue #24)
* Expose RNG option to allow for perf testing with different generators
# 1.3.0
* 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
* 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

17

lib/bytesToUuid.js

@@ -13,12 +13,13 @@ /**

var bth = byteToHex;
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 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('');
}
module.exports = bytesToUuid;

@@ -6,5 +6,7 @@ // Unique ID creation requires a high quality random # generator. In the

// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
(typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
// getRandomValues needs to be invoked in a context where "this" is a Crypto
// implementation. Also, find the complete implementation of crypto on IE11.
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
if (getRandomValues) {

@@ -11,0 +13,0 @@ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto

@@ -46,3 +46,6 @@ var bytesToUuid = require('./bytesToUuid');

generateUUID.name = name;
// only attempt to set the name if's configurable (which it should be on node > 0.12)
if (Object.getOwnPropertyDescriptor(generateUUID, 'name').configurable) {
Object.defineProperty(generateUUID, 'name', {value: name});
}

@@ -49,0 +52,0 @@ // Pre-defined namespaces, per Appendix C

{
"name": "uuid",
"version": "3.2.1",
"version": "3.3.0",
"description": "RFC4122 (v1, v4, and v5) UUIDs",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"keywords": [

@@ -15,8 +20,12 @@ "uuid",

"devDependencies": {
"eslint": "4.5.0",
"mocha": "3.1.2",
"@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.2.0"
"standard-version": "4.4.0"
},
"scripts": {
"commitmsg": "commitlint -E GIT_PARAMS",
"test": "mocha test/test.js",

@@ -35,4 +44,3 @@ "md": "runmd --watch --output=README.md README_js.md",

"url": "https://github.com/kelektiv/node-uuid.git"
},
"dependencies": {}
}
}

@@ -31,3 +31,3 @@ <!--

const uuidv1 = require('uuid/v1');
uuidv1(); // ⇨ 'f64f2940-fae4-11e7-8c5f-ef356f279131'
uuidv1(); // ⇨ '22643650-7944-11e8-8ca7-93cbb72bf7b7'

@@ -60,3 +60,3 @@ ```

const uuidv4 = require('uuid/v4');
uuidv4(); // ⇨ '416ac246-e7ac-49ff-93b4-f7e94d997e6b'
uuidv4(); // ⇨ '7afe74af-5a7d-4a4e-a3c1-ebe44f564695'

@@ -172,4 +172,4 @@ ```

const arr = new Array();
uuidv1(null, arr, 0); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
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 ]
uuidv1(null, arr, 0); // ⇨ [ 34, 101, 32, 176, 121, 68, 17, 232, 146, 52, 147, 203, 183, 43, 247, 183 ]
uuidv1(null, arr, 16); // ⇨ [ 34, 101, 32, 176, 121, 68, 17, 232, 146, 52, 147, 203, 183, 43, 247, 183, 34, 101, 71, 192, 121, 68, 17, 232, 146, 52, 147, 203, 183, 43, 247, 183 ]

@@ -243,4 +243,4 @@ ```

const buffer = new Array();
uuidv4(null, buffer, 0); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250 ]
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 ]
uuidv4(null, buffer, 0); // ⇨ [ 99, 19, 185, 60, 95, 165, 69, 65, 170, 166, 39, 0, 243, 153, 94, 148 ]
uuidv4(null, buffer, 16); // ⇨ [ 99, 19, 185, 60, 95, 165, 69, 65, 170, 166, 39, 0, 243, 153, 94, 148, 208, 145, 176, 198, 100, 47, 65, 92, 182, 96, 194, 143, 212, 122, 218, 15 ]

@@ -247,0 +247,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc