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.
@@ -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';
@@ -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';
@@ -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;
@@ -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 };
@@ -0,0 +1,5 @@
1
+ function now() {
2
+ return Date.now();
3
+ }
4
+
5
+ export { now };
@@ -5,6 +5,6 @@
5
5
  * @example
6
6
  * stubFalse() // Returns false
7
7
  */
8
- declare function stubFalse(): false;
8
+ declare function stubFalse(): boolean;
9
9
 
10
10
  export { stubFalse };
@@ -5,6 +5,6 @@
5
5
  * @example
6
6
  * stubFalse() // Returns false
7
7
  */
8
- declare function stubFalse(): false;
8
+ declare function stubFalse(): boolean;
9
9
 
10
10
  export { stubFalse };
@@ -5,6 +5,6 @@
5
5
  * @example
6
6
  * stubTrue() // Returns true
7
7
  */
8
- declare function stubTrue(): true;
8
+ declare function stubTrue(): boolean;
9
9
 
10
10
  export { stubTrue };
@@ -5,6 +5,6 @@
5
5
  * @example
6
6
  * stubTrue() // Returns true
7
7
  */
8
- declare function stubTrue(): true;
8
+ declare function stubTrue(): boolean;
9
9
 
10
10
  export { stubTrue };
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.923+537e8a42",
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": {