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

durations

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

durations - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "3.3.2",
"version": "3.3.3",
"author": "Joel Edwards (https://github.com/joeledwards)",

@@ -13,0 +13,0 @@ "contributors": [

@@ -22,3 +22,3 @@ # durations

* `stopwatch()` - constructs a new Stopwatch (stopped)
* `time(function)` - times a function
* `time(function)` - times a function synchronously
* `timeAsync(function(callback))` - times a function asynchronously

@@ -31,2 +31,12 @@

### Methods
* `format()` - human readable string representing the duration
* `nanos()` - duration as nanoseconds
* `micros()` - duration as microseconds
* `millis()` - duration as milliseconds
* `seconds()` - duration as seconds
* `minutes()` - duration as minutes
* `hours()` - duration as hours
* `days()` - duration as days
```javascript

@@ -42,12 +52,2 @@ const {duration} = require('durations')

### Methods
* `format()` - human readable string representing the duration
* `nanos()` - duration as nanoseconds
* `micros()` - duration as microseconds
* `millis()` - duration as milliseconds
* `seconds()` - duration as seconds
* `minutes()` - duration as minutes
* `hours()` - duration as hours
* `days()` - duration as days
## Stopwatch

@@ -58,2 +58,9 @@

### Stopwatch Methods
* `start()` - start and return the stopwatch (no-op if already running)
* `stop()` - stop and return the stopwatch (no-op if not running)
* `reset()` - reset to zero elapsed time and return the stopwatch (implies stop)
* `duration()` - fetch the elapsed time as a Duration
* `isRunning()` - is the stopwatch running (`true`/`false`)
```javascript

@@ -77,9 +84,2 @@ const {stopwatch} = require('durations')

### Methods
* `start()` - start the stopwatch (no-op if already running)
* `stop()` - stop the stopwatch (no-op if not running)
* `reset()` - reset the stopwatch to zero elapsed time (implies stop)
* `duration()` - fetch the elapsed time as a Duration
* `isRunning()` - is the stopwatch running (`true`/`false`)
## Timer

@@ -86,0 +86,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