New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hyperid

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperid - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

uniqueness.js

2

benchmark.js

@@ -37,3 +37,3 @@ 'use strict'

suite.add('uuid.v1', function () {
uuid.v4()
uuid.v1()
})

@@ -40,0 +40,0 @@

{
"name": "hyperid",
"version": "1.0.1",
"version": "1.0.2",
"description": "Uber-fast unique id generation, for Node.js and the browser",
"main": "hyperid",
"scripts": {
"test": "standard && tape test.js | tap-spec",
"test": "standard && tape test.js uniqueness.js | tap-spec",
"browser": "zuul --ui tape --local 8080 test.js"

@@ -27,2 +27,3 @@ },

"benchmark": "^2.1.1",
"bloomfilter": "0.0.16",
"hashids": "^1.1.0",

@@ -29,0 +30,0 @@ "nid": "^0.3.2",

@@ -10,9 +10,9 @@ # hyperid

```
hashids process.hrtime x 27,255 ops/sec ±0.71% (91 runs sampled)
hashids counter x 55,038 ops/sec ±1.32% (88 runs sampled)
shortid x 33,322 ops/sec ±2.77% (75 runs sampled)
nid x 1,027,557 ops/sec ±1.08% (86 runs sampled)
uuid.v4 x 342,969 ops/sec ±1.37% (89 runs sampled)
uuid.v1 x 316,735 ops/sec ±3.56% (83 runs sampled)
hyperid x 9,131,590 ops/sec ±4.83% (73 runs sampled)
hashids process.hrtime x 30,118 ops/sec ±1.11% (85 runs sampled)
hashids counter x 56,412 ops/sec ±3.93% (81 runs sampled)
shortid x 28,454 ops/sec ±5.49% (68 runs sampled)
nid x 727,875 ops/sec ±1.90% (82 runs sampled)
uuid.v4 x 320,558 ops/sec ±1.48% (81 runs sampled)
uuid.v1 x 1,893,480 ops/sec ±1.27% (87 runs sampled)
hyperid x 9,250,278 ops/sec ±2.53% (82 runs sampled)
```

@@ -19,0 +19,0 @@

@@ -5,3 +5,2 @@ 'use strict'

const test = require('tape')
const maxInt = Math.pow(2, 31) - 1

@@ -14,3 +13,3 @@ test('generating unique ids', function (t) {

for (var i = 0; i < maxInt * 10; i += Math.ceil(Math.random() * maxInt / 100)) {
for (var i = 0; i < 2048; i++) {
const id = instance()

@@ -17,0 +16,0 @@

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