on-performance

    1.2.2 • Public • Published

    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

    Install

    npm i on-performance

    DownloadsWeekly Downloads

    131

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    8.62 kB

    Total Files

    8

    Last publish

    Collaborators

    • mafintosh
    • benlyn
    • s3ththompson
    • substack
    • yoshuawuyts
    • bret
    • lrlna
    • yerkopalma
    • juliangruber
    • timwis
    • ahdinosaur
    • toddself
    • sethvincent
    • maxogden
    • shama
    • freeman-lab
    • feross
    • emilbayes
    • colingourlay
    • jameskyburz
    • almost
    • slaskis
    • ungoldman
    • graforlock
    • tornqvist
    • amongiants
    • goto-bus-stop