Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 1.0.1 to 1.0.2

7

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

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

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

@@ -8,0 +8,0 @@ "author": {

@@ -18,3 +18,3 @@ # time-span

const { setTimeout } = require('timers/promises')
const timeSpan = require('@kikobeats/time-span')
const timeSpan = require('@kikobeats/time-span')()

@@ -30,3 +30,7 @@ const duration = timeSpan()

```js
const duration = timeSpan({ format: n => `${Math.round(n)}ms`})
const timeSpan = require('@kikobeats/time-span')({
format: n => `${Math.round(n)}ms`
})
const duration = timeSpan()
await setTimeout(5000)

@@ -33,0 +37,0 @@ console.log(duration()) // => 5000ms

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