Comparing version 2.1.4 to 2.1.5
@@ -15,2 +15,3 @@ /** | ||
var pad = require('./lib/pad.js'); | ||
var getRandomValue = require('./lib/getRandomValue.js'); | ||
@@ -23,3 +24,3 @@ var c = 0, | ||
function randomBlock () { | ||
return pad((Math.random() * | ||
return pad((getRandomValue() * | ||
discreteValues << 0) | ||
@@ -26,0 +27,0 @@ .toString(base), blockSize); |
{ | ||
"name": "cuid", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "Collision-resistant ids optimized for horizontal scaling and performance. For node and browsers.", | ||
@@ -11,6 +11,8 @@ "author": { | ||
"browser": { | ||
"./lib/fingerprint.js": "./lib/fingerprint.browser.js" | ||
"./lib/fingerprint.js": "./lib/fingerprint.browser.js", | ||
"./lib/getRandomValue.js": "./lib/getRandomValue.browser.js" | ||
}, | ||
"react-native": { | ||
"./lib/fingerprint.js": "./lib/fingerprint.react-native.js" | ||
"./lib/fingerprint.js": "./lib/fingerprint.react-native.js", | ||
"./lib/getRandomValue.js": "./lib/getRandomValue.react-native.js" | ||
}, | ||
@@ -33,10 +35,10 @@ "keywords": [ | ||
"babel-register": "6.26.0", | ||
"browserify": "16.2.2", | ||
"eslint": "3.19.0", | ||
"browserify": "16.2.3", | ||
"eslint": "5.13.0", | ||
"eslint-plugin-testcafe": "0.2.1", | ||
"mkdirp": "0.5.1", | ||
"tape": "4.9.1", | ||
"testcafe": "0.21.1", | ||
"uglify-js": "3.4.7", | ||
"updtr": "2.0.0", | ||
"tape": "4.9.2", | ||
"testcafe": "1.0.0", | ||
"uglify-js": "3.4.9", | ||
"updtr": "3.1.0", | ||
"watchify": "3.11.0" | ||
@@ -47,3 +49,3 @@ }, | ||
"lint": "eslint index.js lib test", | ||
"test": "npm run lint && npm run test:server && npm run test:browser", | ||
"test": "npm run -s lint && npm run -s test:server && npm run -s test:browser", | ||
"test:browser": "testcafe chrome ./test/browser.js", | ||
@@ -50,0 +52,0 @@ "test:server": "tape -r babel-register -r babel-polyfill test/server.js", |
@@ -38,5 +38,3 @@ # cuid | ||
or download the stand-alone version from [`./dist`](https://github.com/ericelliott/cuid/tree/master/dist). | ||
### Broken down | ||
@@ -52,3 +50,3 @@ | ||
* Client fingerprint | ||
* Pseudo random (`Math.random()` in JavaScript) | ||
* Random (using cryptographically secure libraries where available). | ||
@@ -160,2 +158,3 @@ ## Fingerprints | ||
* [cuid for Swift](https://github.com/raphaelmansuy/cuid) - [Raphael Mansuy](https://github.com/raphaelmansuy) | ||
* [cuid for Rust](https://github.com/mplanchard/cuid-rust) - [Matthew Planchard](https://github.com/mplanchard) | ||
@@ -162,0 +161,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28964
19
226
204