# performance-timing

> 👓 A straight-forward interface to retrieving performance timing metrics.

Latest version **1.0.0** (published 2020-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install performance-timing
pnpm add performance-timing
yarn add performance-timing
bun add performance-timing
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-09-29 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | omrilotan |
| Maintainers | omrilotan |
| Keywords | PerformanceObserver, PerformanceTiming, PerformanceNavigationTiming, PerformanceResourceTiming, PerformancePaintTiming, PerformanceEventTiming, getEntries, observer, promise, async, await, 👓 |

## Links

- npm: https://www.npmjs.com/package/performance-timing
- npm.io page: https://npm.io/package/performance-timing

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-09-29
- 0.1.7 — 2018-05-30

## README

# performance-timing [![](https://img.shields.io/npm/v/performance-timing.svg)](https://www.npmjs.com/package/performance-timing) [![](https://img.shields.io/badge/source--000000.svg?logo=github&style=social)](https://github.com/omrilotan/performance-timing) [![](https://badgen.net/bundlephobia/minzip/performance-timing)](https://bundlephobia.com/result?p=performance-timing)

A straight-forward interface to retrieving performance timing metrics.

### What does it do for me?
Retrieve metrics if they are available, otherwise, set up an observer to be resolved with extracted entries, then disconnected.

```js
import { getEntries } from 'performance-timing';

const [ navigation ] = await getEntries('navigation'); // PerformanceNavigationTiming{}
```

More Examples
```js
const [ firstInpt ] = await getEntries('first-input'); // PerformanceEventTiming{}
const resources = await getEntries('resource'); // [PerformanceResourceTiming{}, ...]
```

Mixed results
```js
const entries = await getEntries('navigation', 'paint');
```

---
_Source: https://npm.io/package/performance-timing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
