Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/pretty-ms-cli
Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s
https://github.com/sindresorhus/pretty-ms-cli
Last synced: about 2 months ago
JSON representation
Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s
- Host: GitHub
- URL: https://github.com/sindresorhus/pretty-ms-cli
- Owner: sindresorhus
- License: mit
- Created: 2015-07-26T19:39:21.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T18:05:23.000Z (5 months ago)
- Last Synced: 2024-05-22T18:04:21.060Z (4 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 27
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# pretty-ms-cli
> Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`
## Install
```sh
npm install --global pretty-ms-cli
```## Usage
```
$ pretty-ms --helpUsage
$ pretty-ms [--compact] [--verbose] [--seconds-decimal-digits=]
echo | pretty-msOptions
-c, --compact Only show the first part
-v, --verbose Use full-length units
-d, --seconds-decimal-digits Number of digits to appear after the seconds decimal pointExamples
$ pretty-ms 1337
1.3s
$ pretty-ms 1337 --verbose
1.3 seconds
$ pretty-ms 1337 --compact
~1s
$ pretty-ms 1337 --seconds-decimal-digits=4
1.3370s
```## Related
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - API for this package