All Projects → choojs → on-performance

choojs / on-performance

Licence: MIT license
Listen for performance timeline events

Programming Languages

javascript
184084 projects - #8 most used programming language

on-performance stability

npm version build status downloads js-standard-style

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

Usage

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].