Skip to content

NIPanag/snowflake-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~ snowflake-js ~

A twitter like snowflake adaption to create unique, time stamp based IDs for node.js
This package is strongly inspired by bwmarrin/snowflake

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());

About

A twitter like snowflake adaption to create unique, time stamp based IDs for node.js

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%