Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 days 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T04:09:56.000Z (about 2 years ago)
- Last Synced: 2024-09-05T10:41:35.353Z (28 days 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
[![npm](https://img.shields.io/npm/v/quiktime?style=flat-square)](https://www.pkgstats.com/pkg:quiktime)
[![NPM](https://img.shields.io/npm/l/quiktime?style=flat-square)](LICENSE)
[![npm](https://img.shields.io/npm/dt/quiktime?style=flat-square)](https://www.pkgstats.com/pkg:quiktime)
[![Coveralls github](https://img.shields.io/coveralls/github/ryanhefner/quiktime?style=flat-square)](https://coveralls.io/github/ryanhefner/quiktime)
[![codecov](https://codecov.io/gh/ryanhefner/quiktime/branch/main/graph/badge.svg)](https://codecov.io/gh/ryanhefner/quiktime)
[![CircleCI](https://img.shields.io/circleci/build/github/ryanhefner/quiktime?style=flat-square)](https://circleci.com/gh/ryanhefner/quiktime)
![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/ryanhefner/quiktime?style=flat-square)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)