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

time-span

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

time-span - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

23

index.js
'use strict';
var convertHrtime = require('convert-hrtime');
const convertHrtime = require('convert-hrtime');
module.exports = function () {
var start = process.hrtime();
module.exports = () => {
const start = process.hrtime();
const end = type => convertHrtime(process.hrtime(start))[type];
var end = function (type) {
return convertHrtime(process.hrtime(start))[type];
};
const ret = () => end('milliseconds');
ret.rounded = () => Math.round(end('milliseconds'));
ret.seconds = () => end('seconds');
ret.nanoseconds = () => end('nanoseconds');
var ret = end.bind(null, 'ms');
ret.rounded = function () {
return Math.round(end('ms'));
};
ret.sec = end.bind(null, 's');
ret.nano = end.bind(null, 'ns');
return ret;
};
{
"name": "time-span",
"version": "1.0.0",
"version": "2.0.0",
"description": "Simplified high resolution timing",

@@ -13,3 +13,3 @@ "license": "MIT",

"engines": {
"node": ">=0.10.0"
"node": ">=4"
},

@@ -41,15 +41,10 @@ "scripts": {

"dependencies": {
"convert-hrtime": "^1.0.0"
"convert-hrtime": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"delay": "^1.1.0",
"delay": "^2.0.0",
"in-range": "^1.0.0",
"xo": "*"
},
"xo": {
"ignores": [
"test.js"
]
}
}

@@ -46,7 +46,7 @@ # time-span [![Build Status](https://travis-ci.org/sindresorhus/time-span.svg?branch=master)](https://travis-ci.org/sindresorhus/time-span)

#### end.sec()
#### end.seconds()
Seconds.
#### end.nano()
#### end.nanoseconds()

@@ -58,2 +58,2 @@ Nanoseconds.

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)
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