@astrolimit/fc-utils 26.1.3 → 26.1.15
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/dist/index.js +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -318,22 +318,22 @@ function parseJson(json, mode) {
|
|
|
318
318
|
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/unique.ts
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
get
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
321
|
+
const counterProxy = {
|
|
322
|
+
_value: 370,
|
|
323
|
+
get len() {
|
|
324
|
+
return `${this._value}`.length;
|
|
325
|
+
},
|
|
326
|
+
get id() {
|
|
327
|
+
this._value = this._value + 1;
|
|
328
|
+
if (this.len > 10) this._value = 370;
|
|
329
|
+
return this._value;
|
|
327
330
|
}
|
|
328
331
|
};
|
|
329
|
-
const numId = new NumIdSingleton();
|
|
330
|
-
let id = 0;
|
|
331
332
|
function uniqueId() {
|
|
332
|
-
|
|
333
|
-
return "F" + Math.random().toString(36).substr(3, 3) + Number(`${Date.now()}`).toString(36) + num.toString(36) + "c";
|
|
333
|
+
return "F" + Math.random().toString(36).slice(3, 6) + Date.now().toString(36) + counterProxy.id.toString(36) + "c";
|
|
334
334
|
}
|
|
335
335
|
function shortKey() {
|
|
336
|
-
return
|
|
336
|
+
return dayjs().diff(dayjs("2025-01-01"), "millisecond").toString(36) + uniqueId().slice(3, 6);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
//#endregion
|