es-toolkit 1.29.0-dev.923 → 1.29.0-dev.925
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/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/index.d.mts +1 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +5 -0
- package/dist/compat/index.mjs +1 -0
- package/dist/compat/util/now.d.mts +18 -0
- package/dist/compat/util/now.d.ts +18 -0
- package/dist/compat/util/now.mjs +5 -0
- package/dist/compat/util/stubFalse.d.mts +1 -1
- package/dist/compat/util/stubFalse.d.ts +1 -1
- package/dist/compat/util/stubTrue.d.mts +1 -1
- package/dist/compat/util/stubTrue.d.ts +1 -1
- package/package.json +1 -1
package/dist/compat/index.d.mts
CHANGED
|
@@ -228,6 +228,7 @@ export { eq } from './util/eq.mjs';
|
|
|
228
228
|
export { gt } from './util/gt.mjs';
|
|
229
229
|
export { gte } from './util/gte.mjs';
|
|
230
230
|
export { iteratee } from './util/iteratee.mjs';
|
|
231
|
+
export { now } from './util/now.mjs';
|
|
231
232
|
export { stubArray } from './util/stubArray.mjs';
|
|
232
233
|
export { stubFalse } from './util/stubFalse.mjs';
|
|
233
234
|
export { stubObject } from './util/stubObject.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -228,6 +228,7 @@ export { eq } from './util/eq.js';
|
|
|
228
228
|
export { gt } from './util/gt.js';
|
|
229
229
|
export { gte } from './util/gte.js';
|
|
230
230
|
export { iteratee } from './util/iteratee.js';
|
|
231
|
+
export { now } from './util/now.js';
|
|
231
232
|
export { stubArray } from './util/stubArray.js';
|
|
232
233
|
export { stubFalse } from './util/stubFalse.js';
|
|
233
234
|
export { stubObject } from './util/stubObject.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -2698,6 +2698,10 @@ function gte(value, other) {
|
|
|
2698
2698
|
return toNumber(value) >= toNumber(other);
|
|
2699
2699
|
}
|
|
2700
2700
|
|
|
2701
|
+
function now() {
|
|
2702
|
+
return Date.now();
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2701
2705
|
function stubArray() {
|
|
2702
2706
|
return [];
|
|
2703
2707
|
}
|
|
@@ -2937,6 +2941,7 @@ exports.max = max;
|
|
|
2937
2941
|
exports.merge = merge;
|
|
2938
2942
|
exports.mergeWith = mergeWith;
|
|
2939
2943
|
exports.min = min;
|
|
2944
|
+
exports.now = now;
|
|
2940
2945
|
exports.omit = omit;
|
|
2941
2946
|
exports.orderBy = orderBy;
|
|
2942
2947
|
exports.pad = pad;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -227,6 +227,7 @@ export { defaultTo } from './util/defaultTo.mjs';
|
|
|
227
227
|
export { gt } from './util/gt.mjs';
|
|
228
228
|
export { gte } from './util/gte.mjs';
|
|
229
229
|
export { iteratee } from './util/iteratee.mjs';
|
|
230
|
+
export { now } from './util/now.mjs';
|
|
230
231
|
export { stubArray } from './util/stubArray.mjs';
|
|
231
232
|
export { stubFalse } from './util/stubFalse.mjs';
|
|
232
233
|
export { stubObject } from './util/stubObject.mjs';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
|
3
|
+
*
|
|
4
|
+
* @returns {number} The current time in milliseconds.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const currentTime = now();
|
|
8
|
+
* console.log(currentTime); // Outputs the current time in milliseconds
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const startTime = now();
|
|
12
|
+
* // Some time-consuming operation
|
|
13
|
+
* const endTime = now();
|
|
14
|
+
* console.log(`Operation took ${endTime - startTime} milliseconds`);
|
|
15
|
+
*/
|
|
16
|
+
declare function now(): number;
|
|
17
|
+
|
|
18
|
+
export { now };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
|
3
|
+
*
|
|
4
|
+
* @returns {number} The current time in milliseconds.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const currentTime = now();
|
|
8
|
+
* console.log(currentTime); // Outputs the current time in milliseconds
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const startTime = now();
|
|
12
|
+
* // Some time-consuming operation
|
|
13
|
+
* const endTime = now();
|
|
14
|
+
* console.log(`Operation took ${endTime - startTime} milliseconds`);
|
|
15
|
+
*/
|
|
16
|
+
declare function now(): number;
|
|
17
|
+
|
|
18
|
+
export { now };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.29.0-dev.
|
|
4
|
+
"version": "1.29.0-dev.925+8f3f9455",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|