Files
codeql-action/node_modules/parse-ms/readme.md
T

34 lines
518 B
Markdown
Raw Normal View History

2023-01-18 20:50:03 +00:00
# parse-ms
2020-05-04 18:50:13 +01:00
> Parse milliseconds into an object
## Install
```
$ npm install parse-ms
```
## Usage
```js
2023-01-18 20:50:03 +00:00
import parseMilliseconds from 'parse-ms';
2020-05-04 18:50:13 +01:00
parseMilliseconds(1337000001);
/*
{
days: 15,
hours: 11,
minutes: 23,
seconds: 20,
milliseconds: 1,
microseconds: 0,
nanoseconds: 0
}
*/
```
## Related
- [to-milliseconds](https://github.com/sindresorhus/to-milliseconds) - The inverse of this module
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string