1.0.3 • Published 12 months ago

@js-bits/performance v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Cross-environment (nodejs/web) performance object

This package exports window.performance object in a browser and built-in Performance measurement APIs module in a Node.js environment. Which is helpful when you develop a package compatible with both environments and use performance for some measurements. Allows to avoid conditional imports.

Installation

Install with npm:

npm install @js-bits/performance

Install with yarn:

yarn add @js-bits/performance

Import where you need it:

import performance from '@js-bits/performance';

or require for CommonJS:

const performance = require('@js-bits/performance');

How to use

const t = performance.now();

Notes

  • Minimal size (bytes) in a browser since Performance API is natively supported. Does not include any polyfills.
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago

1.0.3

12 months ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago