0.0.5 • Published 12 months ago

cherry-id v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

🌸 cherry-id

NPM version jaywcjlove/sb

Introduction

The core algorithm copyright belongs to yitter

more:https://github.com/yitter/IdGenerator

USing cherry-id

npm i cherry-id
const GenId = require('cherry-id');
const genid = new GenId({ WorkerId: (process.argv[2] || 1) - 0 });

(() => {
  console.time("Test Run");
  const HSet = new Set();
  for (let index = 0; index < 500000; index++) {
    HSet.add(genid.NextId());
  }
  console.timeEnd("Test Run");
  console.log([...HSet.values()].join("\n"))
  console.log(HSet.size);
})();
0.0.5

12 months ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago