CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
README.md83 linesDownload Raw Back to ms
1# Installation
2> `npm install --save @types/ms`
3
4# Summary
5This package contains type definitions for ms (https://github.com/vercel/ms).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms/index.d.ts)
10````ts
11/**12 * Short/Long format for `value`.13 *14 * @param {Number} value15 * @param {{long: boolean}} options16 * @return {String}17 */18declare function ms(value: number, options?: { long: boolean }): string;19 20/**21 * Parse the given `value` and return milliseconds.22 *23 * @param {ms.StringValue} value24 * @return {Number}25 */26declare function ms(value: ms.StringValue): number;27 28declare namespace ms {29    // Unit, UnitAnyCase, and StringValue are backported from ms@330    // https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts31 32    type Unit =33        | "Years"34        | "Year"35        | "Yrs"36        | "Yr"37        | "Y"38        | "Weeks"39        | "Week"40        | "W"41        | "Days"42        | "Day"43        | "D"44        | "Hours"45        | "Hour"46        | "Hrs"47        | "Hr"48        | "H"49        | "Minutes"50        | "Minute"51        | "Mins"52        | "Min"53        | "M"54        | "Seconds"55        | "Second"56        | "Secs"57        | "Sec"58        | "s"59        | "Milliseconds"60        | "Millisecond"61        | "Msecs"62        | "Msec"63        | "Ms";64 65    type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;66 67    type StringValue =68        | `${number}`69        | `${number}${UnitAnyCase}`70        | `${number} ${UnitAnyCase}`;71}72 73export = ms;74
75````
76
77### Additional Details
78 * Last updated: Thu, 16 Jan 2025 21:02:45 GMT
79 * Dependencies: none
80
81# Credits
82These definitions were written by [Zhiyuan Wang](https://github.com/danny8002).
83