dustinrouillard / snowflake-id

Time based 64-bit unique id generator, inspired by Twitter snowflakes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SnowflakeId is not a constructor

TwanLuttik opened this issue · comments

const SnowflakeId = require('snowflake-id');

// Initialize snowflake
var snowflake = new SnowflakeId({
	mid : 42,
	offset : (2019-1970)*31536000*1000
});

SnowflakeId is not a constructor

you have to add .default const SnowflakeId = require('snowflake-id').default;