Socket
Socket
Sign inDemoInstall

cuid

Package Overview
Dependencies
2
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.3.1

.eslintignore

2

component.json

@@ -5,3 +5,3 @@ {

"description": "Collision-resistant ids optimized for horizontal scaling and performance",
"version": "1.2.2",
"version": "1.3.0",
"keywords": [

@@ -8,0 +8,0 @@ "uid",

{
"name": "cuid",
"version": "1.3.0",
"version": "1.3.1",
"description": "Collision-resistant ids optimized for horizontal scaling and performance. For node and browsers.",
"author": {
"email": "eric@ericleads.com",
"name": "Eric Elliott",
"url": "http://ericleads.com"
"url": "https://ericelliottjs.com"
},
"main": "./build/server/cuid.js",
"browserify": "./build/client/cuid.js",
"browser": "./build/client/cuid.js",
"keywords": [
"id",
"guid",

@@ -23,30 +23,32 @@ "uid",

"license": "MIT",
"directories": {
"dist": "./dist",
"lib": "./lib",
"src": "./src",
"test": "./test"
},
"devDependencies": {
"babel": "^5.6.14",
"babel-eslint": "^3.1.20",
"babel-loader": "^5.3.0",
"blue-tape": "^0.1.9",
"eslint": "^0.24.0",
"babel": "5.6.14",
"babel-eslint": "3.1.20",
"babel-loader": "5.3.0",
"ecstatic": "^0.8.0",
"eslint": "0.24.0",
"faucet": "0.0.1",
"node-libs-browser": "^0.5.2",
"rimraf": "^2.4.1",
"saucelabs": "^0.1.1",
"webpack": "^1.10.1"
"node-libs-browser": "0.5.2",
"rimraf": "2.4.1",
"sauce-connect-launcher": "^0.12.0",
"saucelabs": "0.1.1",
"tape": "4.2.0",
"wd": "^0.3.12",
"webpack": "1.10.1",
"zuul": "^3.3.0"
},
"scripts": {
"build": "NODE_ENV=production webpack && npm run build:min",
"build:min": "NODE_ENV=production webpack -p",
"clean": "rimraf build",
"lint": "eslint source/**/*.js",
"clean": "rimraf build && rimraf test/client/test-cuid.js",
"prebuild": "npm run clean",
"test": "npm run test:server",
"test:client": "source bin/env.sh && babel-node test/client",
"build": "npm run build:server && npm run build:client && npm run build:test",
"build:server": "NODE_ENV=production WEBPACK_TARGET=server webpack",
"build:client": "NODE_ENV=production WEBPACK_TARGET=client webpack -p",
"build:test": "browserify ./test/client/index.js -s testcuid -t babelify --outfile test/client/test-cuid.js",
"comment:build:test": "NODE_ENV=production WEBPACK_TARGET=test webpack -p",
"lint": "eslint source test",
"test": "npm run test:server && npm run test:client",
"test:client": "zuul -- test/client/test-cuid",
"test:server": "babel-node test/server",
"validate": "npm run lint && npm run test",
"prevalidate": "npm run clean",
"validate": "npm run lint && npm run build && npm run test",
"validate-dev": "npm run lint && npm run build && npm run test | faucet"

@@ -53,0 +55,0 @@ },

@@ -1,3 +0,1 @@

'use strict';
import createCuid from '../index.js';

@@ -7,2 +5,4 @@ const fingerprint = require('browser-fingerprint')();

const { cuid, slug } = createCuid(fingerprint);
export { cuid, slug };
cuid.slug = slug;
export default cuid;

@@ -13,4 +13,2 @@ /**

'use strict';
let c = 0;

@@ -28,3 +26,3 @@ const blockSize = 4;

const safeCounter = function () {
c = (c < discreteValues) ? c : 0;
c = c < discreteValues ? c : 0;
return c++;

@@ -31,0 +29,0 @@ };

@@ -1,3 +0,1 @@

'use strict';
import createCuid from '../index.js';

@@ -7,2 +5,4 @@ const fingerprint = require('node-fingerprint')();

const { cuid, slug } = createCuid(fingerprint);
export { cuid, slug };
cuid.slug = slug;
export default cuid;

@@ -1,6 +0,5 @@

'use strict';
import cuid from '../../source/server/index.js';
import test from 'tape';
const { slug } = cuid;
import { cuid, slug } from '../../source/server/index.js';
import test from 'blue-tape';
const MAX = 1200000;

@@ -7,0 +6,0 @@

@@ -1,6 +0,18 @@

module.exports = {
entry: "./source/client/index.js",
output: {
path: 'build/client',
filename: "cuid.js"
var target = process.env.WEBPACK_TARGET;
var config = {
entry: {},
output: target === 'client' ? {
library: 'cuid',
libraryTarget: 'umd',
path: 'build/',
filename: target + '-cuid.js'
} : target === 'test' ? {
library: 'testCuid',
libraryTarget: 'umd',
path: 'test/client/',
filename: target + '-cuid.js'
} : {
path: 'build/',
filename: target + '-cuid.js'
},

@@ -16,2 +28,8 @@ module: {

}
}
};
config.entry = target === 'test' ?
'./test/client/index.js' :
'./source/' + target + '/index.js';
module.exports = config;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc