Comparing version 2.1.1 to 2.1.2
@@ -0,1 +1,6 @@ | ||
2.1.2 / 2016-08-15 | ||
================== | ||
* deps: base64-url@1.3.2 | ||
2.1.1 / 2016-05-04 | ||
@@ -2,0 +7,0 @@ ================== |
12
index.js
@@ -35,3 +35,3 @@ /*! | ||
function uid(length, callback) { | ||
function uid (length, callback) { | ||
// validate callback is a function, if provided | ||
@@ -52,4 +52,4 @@ if (callback !== undefined && typeof callback !== 'function') { | ||
return new Promise(function executor(resolve, reject) { | ||
generateUid(length, function onUid(err, str) { | ||
return new Promise(function executor (resolve, reject) { | ||
generateUid(length, function onUid (err, str) { | ||
if (err) return reject(err) | ||
@@ -69,3 +69,3 @@ resolve(str) | ||
function uidSync(length) { | ||
function uidSync (length) { | ||
return toString(randomBytes.sync(length)) | ||
@@ -82,3 +82,3 @@ } | ||
function generateUid(length, callback) { | ||
function generateUid (length, callback) { | ||
randomBytes(length, function (err, buf) { | ||
@@ -98,4 +98,4 @@ if (err) return callback(err) | ||
function toString(buf) { | ||
function toString (buf) { | ||
return escape(buf.toString('base64')) | ||
} |
{ | ||
"name": "uid-safe", | ||
"description": "URL and cookie safe UIDs", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"contributors": [ | ||
@@ -12,9 +12,13 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
"dependencies": { | ||
"base64-url": "1.2.2", | ||
"base64-url": "1.3.2", | ||
"random-bytes": "~1.0.0" | ||
}, | ||
"devDependencies": { | ||
"bluebird": "3.3.5", | ||
"istanbul": "0.4.3", | ||
"mocha": "2.4.5" | ||
"bluebird": "3.4.1", | ||
"eslint": "2.13.1", | ||
"eslint-config-standard": "5.3.5", | ||
"eslint-plugin-promise": "2.0.1", | ||
"eslint-plugin-standard": "2.0.0", | ||
"istanbul": "0.4.4", | ||
"mocha": "2.5.3" | ||
}, | ||
@@ -31,2 +35,3 @@ "files": [ | ||
"scripts": { | ||
"lint": "eslint **/*.js", | ||
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", | ||
@@ -33,0 +38,0 @@ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/", |
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
7013
7
+ Addedbase64-url@1.3.2(transitive)
- Removedbase64-url@1.2.2(transitive)
Updatedbase64-url@1.3.2