Throw an error if you try to initiate a new SnowflakeUtil class instance (#1413)

This commit is contained in:
bdistin
2017-04-25 16:29:30 -05:00
committed by Crawl
parent 909b825c94
commit 298ee4e79f

View File

@@ -8,6 +8,10 @@ let INCREMENT = 0;
* A container for useful snowflake-related methods
*/
class SnowflakeUtil {
constructor() {
throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
}
/**
* A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z
* ```