Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 --help

Usage
$ pretty-ms [--compact] [--verbose] [--seconds-decimal-digits=]
echo | pretty-ms

Options
-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 point

Examples
$ 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