Comparing version 2.0.1 to 3.0.0
{ | ||
"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 | ||
} |
11
test.js
@@ -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(); |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
0
0
4926
5
85
- Removedbindings@^1.5.0
- Removedbindings@1.5.0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)