SnowflakeId is not a constructor
TwanLuttik opened this issue · comments
Twan L commented
const SnowflakeId = require('snowflake-id');
// Initialize snowflake
var snowflake = new SnowflakeId({
mid : 42,
offset : (2019-1970)*31536000*1000
});
SnowflakeId is not a constructor
Twan L commented
you have to add .default const SnowflakeId = require('snowflake-id').default;