@sapphire/snowflake 3.1.0 → 3.2.0-next.024dcee.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -78,11 +78,8 @@ const uniqueId = snowflake.generate();
|
|
|
78
78
|
// Import the Snowflake class
|
|
79
79
|
const { DiscordSnowflake } = require('@sapphire/snowflake');
|
|
80
80
|
|
|
81
|
-
// Create an instance of Snowflake
|
|
82
|
-
const discordSnowflake = new DiscordSnowflake();
|
|
83
|
-
|
|
84
81
|
// Generate a snowflake with Discord's epoch
|
|
85
|
-
const uniqueId =
|
|
82
|
+
const uniqueId = DiscordSnowflake.generate();
|
|
86
83
|
|
|
87
84
|
// Alternatively, you can use the method directly
|
|
88
85
|
const uniqueId = DiscordSnowflake.generate();
|
|
@@ -94,11 +91,8 @@ const uniqueId = DiscordSnowflake.generate();
|
|
|
94
91
|
// Import the Snowflake class
|
|
95
92
|
const { TwitterSnowflake } = require('@sapphire/snowflake');
|
|
96
93
|
|
|
97
|
-
// Create an instance of Snowflake
|
|
98
|
-
const twitterSnowflake = new TwitterSnowflake();
|
|
99
|
-
|
|
100
94
|
// Generate a snowflake with Twitter's epoch
|
|
101
|
-
const uniqueId =
|
|
95
|
+
const uniqueId = TwitterSnowflake.generate();
|
|
102
96
|
|
|
103
97
|
// Alternatively, you can use the method directly
|
|
104
98
|
const uniqueId = TwitterSnowflake.generate();
|
|
@@ -128,11 +122,8 @@ const uniqueId = snowflake.deconstruct('3971046231244935168');
|
|
|
128
122
|
// Import the Snowflake class
|
|
129
123
|
const { DiscordSnowflake } = require('@sapphire/snowflake');
|
|
130
124
|
|
|
131
|
-
// Create an instance of Snowflake
|
|
132
|
-
const discordSnowflake = new DiscordSnowflake();
|
|
133
|
-
|
|
134
125
|
// Deconstruct a snowflake with Discord's epoch
|
|
135
|
-
const uniqueId =
|
|
126
|
+
const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
|
|
136
127
|
|
|
137
128
|
// Alternatively, you can use the method directly
|
|
138
129
|
const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
|
|
@@ -144,11 +135,8 @@ const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
|
|
|
144
135
|
// Import the Snowflake class
|
|
145
136
|
const { TwitterSnowflake } = require('@sapphire/snowflake');
|
|
146
137
|
|
|
147
|
-
// Create an instance of Snowflake
|
|
148
|
-
const twitterSnowflake = new TwitterSnowflake();
|
|
149
|
-
|
|
150
138
|
// Deconstruct a snowflake with Twitter's epoch
|
|
151
|
-
const uniqueId =
|
|
139
|
+
const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
|
|
152
140
|
|
|
153
141
|
// Alternatively, you can use the method directly
|
|
154
142
|
const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
|
|
@@ -213,6 +201,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
213
201
|
<td align="center"><a href="https://github.com/ItsMrCube"><img src="https://avatars.githubusercontent.com/u/25201357?v=4?s=100" width="100px;" alt=""/><br /><sub><b>MrCube</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ItsMrCube" title="Code">💻</a></td>
|
|
214
202
|
<td align="center"><a href="https://github.com/bitomic"><img src="https://avatars.githubusercontent.com/u/35199700?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bitomic</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=bitomic" title="Code">💻</a></td>
|
|
215
203
|
</tr>
|
|
204
|
+
<tr>
|
|
205
|
+
<td align="center"><a href="https://c43721.dev/"><img src="https://avatars.githubusercontent.com/u/55610086?v=4?s=100" width="100px;" alt=""/><br /><sub><b>c43721</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=c43721" title="Code">💻</a></td>
|
|
206
|
+
</tr>
|
|
216
207
|
</table>
|
|
217
208
|
|
|
218
209
|
<!-- markdownlint-restore -->
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscordSnowflake.d.ts","sourceRoot":"","sources":["../../src/lib/DiscordSnowflake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Snowflake.d.ts","sourceRoot":"","sources":["../../src/lib/Snowflake.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,qBAAa,SAAS;;IAarB;;OAEG;IAEI,MAAM,OAuDU,MAAM,GAAG,MAAM,KAAG,sBAAsB,CAvD9B;IAEjC;;OAEG;gBACgB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIhD;;OAEG;IACH,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED;;;;;;;;;;;OAWG;IACI,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAsB,EAAE,QAAmB,EAAE,SAAqB,EAAE,GAAE,wBAA6B;IAiBhI;;;;;;;;;OASG;IACI,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,sBAAsB;IAY/D;;;;OAIG;IACI,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;CAGjD;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAEnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwitterSnowflake.d.ts","sourceRoot":"","sources":["../../src/lib/TwitterSnowflake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire/snowflake",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-next.024dcee.0",
|
|
4
4
|
"description": "Deconstructs and generates snoflake IDs using BigInts",
|
|
5
5
|
"author": "@sapphire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"typedocMain": "src/index.ts",
|
|
13
13
|
"exports": {
|
|
14
14
|
"import": "./dist/index.mjs",
|
|
15
|
-
"require": "./dist/index.js"
|
|
15
|
+
"require": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
16
17
|
},
|
|
17
18
|
"sideEffects": false,
|
|
18
19
|
"homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/snowflake",
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"publishConfig": {
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "024dceec54c07ac279490a26f73cacb46f63c9a4"
|
|
55
56
|
}
|