# on-performance

> Listen for performance timeline events

Latest version **1.2.2** (published 2018-05-16) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2018-05-16 |
| First published | 2017-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Maintainers | ahdinosaur, almost, amongiants, benlyn, bret, colingourlay, emilbayes, feross, freeman-lab, goto-bus-stop, graforlock, jameskyburz, juliangruber, lrlna, maxogden, s3ththompson, sethvincent, shama, slaskis, substack, timwis, toddself, tornqvist, ungoldman, yerkopalma, yoshuawuyts |
| Keywords | performance, timeline, api |

## Links

- npm: https://www.npmjs.com/package/on-performance
- Repository: https://github.com/choojs/on-performance
- Homepage: https://github.com/choojs/on-performance#readme
- Issues: https://github.com/choojs/on-performance/issues
- npm.io page: https://npm.io/package/on-performance

## Dependencies (2)

- [nanoassert](https://npm.io/package/nanoassert.md) ^1.1.0
- [nanoscheduler](https://npm.io/package/nanoscheduler.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2018-05-16
- 1.2.1 — 2018-01-24
- 1.2.0 — 2018-01-24
- 1.1.0 — 2017-12-15
- 1.0.1 — 2017-06-17
- 1.0.0 — 2017-06-17

## README

# on-performance [![stability][0]][1]
[![npm version][2]][3] [![build status][4]][5]
[![downloads][8]][9] [![js-standard-style][10]][11]

Listen for performance timeline events and clears them after usage. Returns a
singleton. Can be used in both node and browser environments.

## Usage
```js
var onPerformance = require('on-performance')

onPerformance(function (entry) {
  console.log('entry: ', entry.entryType, entry)
})
```

## API
### `stop = onPerformance(callback(entry))`
Listen for performance events. Returns a singleton (e.g. multiple calls to this
method are registered on the same listener). If multiple instances are created
during the first tick, all initial events will be played back to all instances.

### `stop()`
Stop the observer.

## License
[MIT](https://tldrlegal.com/license/mit-license)

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/on-performance.svg?style=flat-square
[3]: https://npmjs.org/package/on-performance
[4]: https://img.shields.io/travis/choojs/on-performance/master.svg?style=flat-square
[5]: https://travis-ci.org/choojs/on-performance
[6]: https://img.shields.io/codecov/c/github/choojs/on-performance/master.svg?style=flat-square
[7]: https://codecov.io/github/choojs/on-performance
[8]: http://img.shields.io/npm/dm/on-performance.svg?style=flat-square
[9]: https://npmjs.org/package/on-performance
[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[11]: https://github.com/feross/standard

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