0.0.1 • Published 7 years ago
performancenow v0.0.1
performancenow
Simple performance.now()
polyfill for old browsers and node.
Installation
$ npm install performancenow
API
Make sure to import performancenow
module in your application entrypoint, it
will make a time stamp to measure against on every subsequent call.
import 'performancenow';
Then just import as a usual module wherever you need it.
import now from 'performancenow';
let timestamp = now();
// => 15.02
To polyfill performance.now()
function.
performance = performance || {};
performance.now = performance.now || require('performancenow');
Running tests
$ npm install
$ npm test