performancenow

0.0.1 • Public • Published

performancenow

npm version Build Status

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

License

MIT

Package Sidebar

Install

npm i performancenow

Weekly Downloads

8

Version

0.0.1

License

MIT

Last publish

Collaborators

  • yefremov