@brikcss/timer

1.0.4 • Public • Published

Timer

Simple timer utility to start, stop, check duration, and clear a timer. Works in Node, JS/UMD modules, or the browser.

NPM version NPM downloads per month Travis branch NPM version Coverage Status Commitizen friendly semantic release code style: prettier

Install

npm install @brikcss/timer --save-dev

Usage

timer.start(id)

Start a new or existing timer. Creates one if it doesn't exist. Returns the newly created timer object.

timer.stop(id)

Stop an existing timer. Returns the timer's duration as a string.

timer.duration(id)

Get the duration of a timer. Returns a string in ms or s.

timer.clear(id)

Clear / remove a timer from memory.

Environment support

Node CLI UMD ES Module Browser
x

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i @brikcss/timer

    Weekly Downloads

    0

    Version

    1.0.4

    License

    none

    Unpacked Size

    12.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • thezimmee