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

uuid-int

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uuid-int - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

index.js

11

package.json
{
"name": "uuid-int",
"version": "2.0.1",
"version": "3.0.0",
"description": "uuid-int for nodejs",
"main": "addon.js",
"scripts": {
"test": "node test.js",
"build": "node-gyp rebuild"
"test": "node test.js"
},

@@ -22,5 +21,3 @@ "keywords": [

"license": "MIT",
"dependencies": {
"bindings": "^1.5.0"
},
"dependencies": {},
"homepage": "https://github.com/wbget/uuid-int",

@@ -32,5 +29,5 @@ "repository": {

"devDependencies": {
"assert": "^2.0.0"
"power-assert": "^1.6.1"
},
"gypfile": true
}

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

const assert = require('assert');
const UUID = require('./addon');
const assert = require('power-assert');
const UUID = require('./index');

@@ -8,11 +8,10 @@ assert.throws(() => UUID(), Error, 'need id');

assert.throws(() => UUID('28'), Error, 'id must be number');
assert.throws(() => UUID(2, Date.now() / 1000 + 1), Error, 'seed out of range');
assert.throws(() => UUID(2, Date.now() + 1), Error, 'seed out of range');
assert.throws(() => UUID(2, -1), Error, 'seed out of range');
assert.throws(() => UUID(2, '392'), Error, 'seed must be number');
const t0 = UUID(0, Date.now() / 1000);
const t0 = UUID(0, Date.now());
assert(t0.uuid() === 0x200000);
const t1 = UUID(1);
console.log(t1.uuid());
const t2 = UUID(2);

@@ -39,3 +38,3 @@ assert(t1.id === 1);

let catchError = false;
for (let i = 0; i < 10000; i++) {
for (let i = 0; i < 4097; i++) {
try {

@@ -42,0 +41,0 @@ t4.uuid();

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