Socket
Socket
Sign inDemoInstall

@kikobeats/time-span

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kikobeats/time-span - npm Package Compare versions

Comparing version 0.0.1 to 1.0.1

4

index.js
module.exports =
(start = process.hrtime.bigint()) =>
({ start = process.hrtime.bigint(), format = n => n } = {}) =>
() =>
Number(process.hrtime.bigint() - start) / 1e6
format(Number(process.hrtime.bigint() - start) / 1e6)

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/kikobeats/time-span",
"version": "0.0.1",
"version": "1.0.1",
"main": "index.js",

@@ -40,2 +40,4 @@ "author": {

"@ksmithut/prettier-standard": "latest",
"ava": "latest",
"c8": "latest",
"ci-publish": "latest",

@@ -68,3 +70,3 @@ "conventional-github-releaser": "latest",

"release:tags": "git push --follow-tags origin HEAD:master",
"test": "exit 0",
"test": "c8 ava",
"update": "ncu -u",

@@ -71,0 +73,0 @@ "update:check": "ncu -- --error-level 2"

@@ -26,2 +26,10 @@ # time-span

It also accepts a `format` function:
```js
const duration = timeSpan({ format: n => `${Math.round(n)}ms`})
await setTimeout(5000)
console.log(duration()) // => 5000ms
```
## License

@@ -28,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc