timoi
v1.1.12
Published
Yet another elapse time library.
Downloads
80
Readme
Timoi
Yet another elapse time library.
Installation
$ npm i timoi
Usage
Log to the console or take timing date for further computation
import timoi from "timoi"
const time = timoi()
doWork()
time() // console.log(`Took ${x}ms`)
time.time() // x
time.str() // `${x}ms`
Named scopes
import timoi from "timoi"
const time = timoi("doWork")
doWork()
time() // console.log(`doWork took ${x}ms`)
doWork()
time() // console.log(`doWork#2 took ${x}ms`)
Contribute
All feedback is appreciated. Create a pull request or write an issue.