We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5bc912 commit 633473cCopy full SHA for 633473c
src/generateUniqueID.ts
@@ -6,8 +6,17 @@ const CUSTOM_EPOCH = 1546300800000; // 01-01-2019
6
const MAX_MACHINE_ID = (1 << 12) - 1;
7
8
interface Config {
9
+ /**
10
+ * Defaults to 1546300800000 (01-01-2019). This is UNIX timestamp in ms
11
+ */
12
customEpoch?: number;
13
14
+ * Defaults to false. If set to true, the returned ids will be of type BigInt or else of type string
15
16
returnNumber?: boolean;
17
18
+ * A value ranging between 0 - 4095. If not provided then a random value will be used
19
20
machineID?: number;
21
}
22
0 commit comments