Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-snowflake-id

xfy19645ISC1.0.2

nodejs的分布式id解决方案 参考Twitter的snowflake js const SnowflakeID = require("SnowflakeID") const sid = new SnowflakeID() let arr = [] for(let i = 0; i < 10000; i++){ arr.push(sid.generate()) } console.log(arr)

id, snowflake, snowflakeid, node-snowflake, node-id

readme

nodejs的分布式id解决方案 参考Twitter的snowflake

const SnowflakeID = require("SnowflakeID")
const sid = new SnowflakeID()
let arr = []
for(let i = 0; i < 10000; i++){
    arr.push(sid.generate())
}
console.log(arr)