https://github.com/ryanhefner/quiktime
⏱ Quickly format duration time values in a condensed format.
https://github.com/ryanhefner/quiktime
npm-package time-formatting
Last synced: 9 months ago
JSON representation
⏱ Quickly format duration time values in a condensed format.
- Host: GitHub
- URL: https://github.com/ryanhefner/quiktime
- Owner: ryanhefner
- License: mit
- Created: 2022-07-01T01:34:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T04:09:56.000Z (almost 4 years ago)
- Last Synced: 2025-03-03T17:46:27.026Z (about 1 year ago)
- Topics: npm-package, time-formatting
- Language: JavaScript
- Homepage: https://www.pkgstats.com/pkg:quiktime
- Size: 98.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ⏱ quiktime
[](https://www.pkgstats.com/pkg:quiktime)
[](LICENSE)
[](https://www.pkgstats.com/pkg:quiktime)
[](https://coveralls.io/github/ryanhefner/quiktime)
[](https://codecov.io/gh/ryanhefner/quiktime)
[](https://circleci.com/gh/ryanhefner/quiktime)

Quickly format duration time values in a condensed format.
## Install
Via [npm](https://npmjs.com/package/quiktime)
```sh
npm install quiktime
```
Via [Yarn](https://yarn.pm/quiktime)
```sh
yarn add quiktime
```
## How to use
**Without Options**
```
import quiktime from 'quiktime'
console.debug(quiktime(1200))
===
Output: 1.2 ms
```
**With Options**
```
import quiktime from 'quiktime`
console.debug(quiktime(1234, { maximumFractionDigits: 3 }))
===
Output: 1.234 ms
```
### Options
* `minimumIntegerDigits: number` - The minimum number of integer digits to use. Possible values are from `1` to `21`; the default is `1`.
* `minimumFractionDigits: number` - The minimum number of fraction digits to use. Possible values are from `0` to `20`; the default is `0`.
* `maximumFractionDigits: number` - The maximum number of fraction digits to use. Possible values are from `0` to `20`; the default is `2`
## License
[MIT](LICENSE) © [Ryan Hefner](https://www.ryanhefner.com)