quiktime
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

⏱ quiktime

npm NPM npm Coveralls github codecov CircleCI Snyk Vulnerabilities for GitHub Repo

Quickly format duration time values in a condensed format.

Install

Via npm

npm install quiktime

Via Yarn

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 © Ryan Hefner

Dependencies (0)

    Dev Dependencies (23)

    Package Sidebar

    Install

    npm i quiktime

    Weekly Downloads

    69

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    18.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • ryanhefner