Socket
Socket
Sign inDemoInstall

performance-now

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

performance-now - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

33

lib/performance-now.js

@@ -5,17 +5,24 @@ // Generated by CoffeeScript 1.6.2

hrtime = process.hrtime;
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
module.exports = function() {
return performance.now();
};
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
module.exports = function() {
return (getNanoSeconds() - loadTime) / 1e6;
};
hrtime = process.hrtime;
getNanoSeconds = function() {
var hr;
module.exports = function() {
return (getNanoSeconds() - loadTime) / 1e6;
};
hr = hrtime();
return hr[0] * 1e9 + hr[1];
};
loadTime = getNanoSeconds();
} else {
module.exports = function() {
return Date.now();
};
}
getNanoSeconds = function() {
var hr;
hr = hrtime();
return hr[0] * 1e9 + hr[1];
};
loadTime = getNanoSeconds();
}).call(this);

@@ -22,0 +29,0 @@

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

"keywords": [],
"version": "0.1.1",
"version": "0.1.2",
"author": "Meryn Stol <merynstol@gmail.com>",

@@ -8,0 +8,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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