Socket
Socket
Sign inDemoInstall

perfy

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.2

27

index.js

@@ -1,2 +0,2 @@

/*jslint node, white, this, for */
/* eslint no-param-reassign:0 */

@@ -13,12 +13,11 @@ /**

* // some heavy stuff here...
* console.log(perfy.end('loop-test').summary);
* console.log(perfy.end('loop-test').time);
*/
module.exports = (function () {
'use strict';
// See https://nodejs.org/api/process.html#process_process_hrtime
//---------------------------------
// --------------------------------
// CLASS: PerfyItem
//---------------------------------
// --------------------------------

@@ -64,5 +63,5 @@ function PerfyItem(name) {

};
o.time = parseFloat(o.seconds + '.' + Math.round(o.milliseconds));
o.time = Number(((o.seconds * 1000 + o.milliseconds) / 1000).toFixed(3));
var n = this.name ? this.name + ': ' : '';
o.summary = n + o.time.toFixed(3) + ' sec.';
o.summary = n + o.time + ' sec.';
this.result = o;

@@ -72,5 +71,5 @@ return o;

//---------------------------------
// --------------------------------
// CLASS: perfy
//---------------------------------
// --------------------------------

@@ -89,3 +88,3 @@ // storage for PerfyItem instances

name = String(name);
autoDestroy = autoDestroy === undefined ? true : autoDestroy;
autoDestroy = typeof autoDestroy === 'undefined' ? true : autoDestroy;
perfList[name] = new PerfyItem(name);

@@ -121,3 +120,3 @@ perfList[name].autoDestroy = autoDestroy;

if (!name) { throw new Error(ERR.NAME); }
return !!perfList[name];
return Boolean(perfList[name]);
};

@@ -180,8 +179,8 @@

//---------------------------------
// --------------------------------
// EXPORT
//---------------------------------
// --------------------------------
return perfy;
}());
}());
{
"name": "perfy",
"version": "1.1.0",
"version": "1.1.2",
"description": "A simple, light-weight NodeJS utility for measuring code execution in high-resolution real times.",

@@ -12,3 +12,4 @@ "author": {

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "grunt",
"lint": "eslint index.js test"
},

@@ -38,2 +39,3 @@ "repository": {

"devDependencies": {
"eslint": "^2.4.0",
"grunt": "^0.4.5",

@@ -40,0 +42,0 @@ "grunt-jasmine-nodejs": "^1.4.3"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc