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

timeit-js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timeit-js - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

15

index.js

@@ -23,7 +23,9 @@ /**

const r = elapsed / e // time for one execution
results.push(+(Math.round(r + `e+${6}`) + `e-${6}`))
const result = elapsed / e
results.push(+(Math.round(result + `e+${6}`) + `e-${6}`))
}
const ms = (results.reduce((p, c) => p + c, 0)) // results.length
const ms = (results.reduce((p, c) => p + c, 0)) / results.length
if (l) {

@@ -35,5 +37,12 @@ console.log(`Function : ${fn.name}()`)

}
return ms
}
function sum () {
return [...arguments].reduce((p, c) => p+c, 0)
}
timeit(sum, args=[1, 2, 3, 4], options={e: 100000, r: 1, d: 6})
module.exports = timeit

2

package.json
{
"name": "timeit-js",
"version": "0.0.7",
"version": "0.0.8",
"description": "Performance Measuring for Node JS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -51,3 +51,3 @@ # timeit-js

timeit(sum, args=[1, 2, 3, 4], options={e: 100000, r: 100, d: 2})
timeit(sum, args=[1, 2, 3, 4], options={e: 100000, r: 100, d: 6})
```
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