1.0.0 • Published 6 years ago
@zekro/snowflake-js v1.0.0
ATTENTION!
This package is only working with Node.js 10.13.0 and higher!
Usage
const Snowflake = require('../snowflake');
// Create a node in which snowflakes will be counted
// up in steps if they get generated in the same
// millisecond.
var node1 = new Snowflake.Node(1);
// Get next snowflake. This will be returned as
// BigInteger.
console.log(node1.next());
1.0.0
6 years ago