{"id":28509846,"url":"https://github.com/choojs/on-performance","last_synced_at":"2025-07-03T01:31:24.951Z","repository":{"id":57314425,"uuid":"94594320","full_name":"choojs/on-performance","owner":"choojs","description":"Listen for performance timeline events","archived":false,"fork":false,"pushed_at":"2018-05-11T07:37:42.000Z","size":18,"stargazers_count":26,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T22:39:42.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/choojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-17T02:00:46.000Z","updated_at":"2021-01-31T15:08:00.000Z","dependencies_parsed_at":"2022-09-20T23:21:48.337Z","dependency_job_id":null,"html_url":"https://github.com/choojs/on-performance","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/choojs/on-performance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fon-performance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fon-performance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fon-performance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fon-performance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choojs","download_url":"https://codeload.github.com/choojs/on-performance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fon-performance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263243641,"owners_count":23436343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T22:37:30.324Z","updated_at":"2025-07-03T01:31:24.927Z","avatar_url":"https://github.com/choojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# on-performance [![stability][0]][1]\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nListen for performance timeline events and clears them after usage. Returns a\nsingleton. Can be used in both node and browser environments.\n\n## Usage\n```js\nvar onPerformance = require('on-performance')\n\nonPerformance(function (entry) {\n  console.log('entry: ', entry.entryType, entry)\n})\n```\n\n## API\n### `stop = onPerformance(callback(entry))`\nListen for performance events. Returns a singleton (e.g. multiple calls to this\nmethod are registered on the same listener). If multiple instances are created\nduring the first tick, all initial events will be played back to all instances.\n\n### `stop()`\nStop the observer.\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/on-performance.svg?style=flat-square\n[3]: https://npmjs.org/package/on-performance\n[4]: https://img.shields.io/travis/choojs/on-performance/master.svg?style=flat-square\n[5]: https://travis-ci.org/choojs/on-performance\n[6]: https://img.shields.io/codecov/c/github/choojs/on-performance/master.svg?style=flat-square\n[7]: https://codecov.io/github/choojs/on-performance\n[8]: http://img.shields.io/npm/dm/on-performance.svg?style=flat-square\n[9]: https://npmjs.org/package/on-performance\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fon-performance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoojs%2Fon-performance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fon-performance/lists"}