@ztimson/utils 0.26.26 → 0.27.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/dist/index.cjs +126 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +126 -117
- package/dist/index.mjs.map +1 -1
- package/dist/math.d.ts +10 -0
- package/dist/time.d.ts +3 -0
- package/package.json +1 -1
package/dist/math.d.ts
CHANGED
|
@@ -23,3 +23,13 @@ export declare function dec2Frac(num: number, maxDen?: number): string;
|
|
|
23
23
|
* @return {number} Faction as a decimal
|
|
24
24
|
*/
|
|
25
25
|
export declare function fracToDec(frac: string): number;
|
|
26
|
+
/**
|
|
27
|
+
* Add a suffix to a number:
|
|
28
|
+
* 1 = 1st
|
|
29
|
+
* 2 = 2nd
|
|
30
|
+
* 3 = 3rd
|
|
31
|
+
* N = Nth
|
|
32
|
+
* @param {number} n
|
|
33
|
+
* @returns {string}
|
|
34
|
+
*/
|
|
35
|
+
export declare function numSuffix(n: number): string;
|
package/dist/time.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* @return {() => void}
|
|
6
6
|
*/
|
|
7
7
|
export declare function adjustedInterval(cb: Function, ms: number): () => void;
|
|
8
|
+
export declare function dayOfWeek(d: number): string;
|
|
9
|
+
export declare function dayOfYear(date: Date): number;
|
|
8
10
|
/**
|
|
9
11
|
* Format date
|
|
10
12
|
*
|
|
@@ -22,6 +24,7 @@ export declare function formatDate(format?: string, date?: Date | number | strin
|
|
|
22
24
|
* @return {number} Clear Interval ID
|
|
23
25
|
*/
|
|
24
26
|
export declare function instantInterval(fn: () => any, interval: number): NodeJS.Timeout;
|
|
27
|
+
export declare function month(m: number): string;
|
|
25
28
|
/**
|
|
26
29
|
* Use in conjunction with `await` to pause an async script
|
|
27
30
|
*
|