@hestia-earth/utils 0.16.13 → 0.16.14

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/number.d.ts CHANGED
@@ -84,6 +84,6 @@ export declare const converters: {
84
84
  export declare const convertValue: (n: number, fromUnit: ConvertUnits, toUnit: ConvertUnits, args?: IConvertArgs) => number;
85
85
  export declare const sum: (values?: number[]) => number;
86
86
  export declare const mean: (values?: number[]) => number;
87
- export declare const min: (values: number[]) => any;
88
- export declare const max: (values: number[]) => any;
87
+ export declare const min: (values: number[]) => number;
88
+ export declare const max: (values: number[]) => number;
89
89
  export declare const median: (values: number[]) => number;
package/dist/string.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const toDashCase: (value?: string) => string;
21
21
  * @returns A camel case version of the value.
22
22
  */
23
23
  export declare const toCamelCase: (value?: string) => string;
24
+ export declare const dateToString: (date: Date) => string;
24
25
  /**
25
26
  * Returns current date in YYYY-MM-DD format.
26
27
  *
package/dist/string.js CHANGED
@@ -16,7 +16,7 @@ var __read = (this && this.__read) || function (o, n) {
16
16
  return ar;
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.parseCitation = exports.parseMarkdownLink = exports.now = exports.toCamelCase = exports.toDashCase = exports.keyToLabel = exports.ellipsis = void 0;
19
+ exports.parseCitation = exports.parseMarkdownLink = exports.now = exports.dateToString = exports.toCamelCase = exports.toDashCase = exports.keyToLabel = exports.ellipsis = void 0;
20
20
  /**
21
21
  * Trims the string to a certain max length and replace with `...`.
22
22
  *
@@ -87,12 +87,14 @@ var toCamelCase = function (value) {
87
87
  : null;
88
88
  };
89
89
  exports.toCamelCase = toCamelCase;
90
+ var dateToString = function (date) { return date.toJSON().substring(0, 10); };
91
+ exports.dateToString = dateToString;
90
92
  /**
91
93
  * Returns current date in YYYY-MM-DD format.
92
94
  *
93
95
  * @returns Date as a string.
94
96
  */
95
- var now = function () { return new Date().toJSON().substring(0, 10); };
97
+ var now = function () { return (0, exports.dateToString)(new Date()); };
96
98
  exports.now = now;
97
99
  /**
98
100
  * Parse a markdown link.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/utils",
3
- "version": "0.16.13",
3
+ "version": "0.16.14",
4
4
  "description": "HESTIA Utils library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",