Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uid-safe

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uid-safe - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

5

HISTORY.md

@@ -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/",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc