New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chronotrigger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chronotrigger

turn events into time

  • 0.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chronotrigger

turn events into timing information

what

takes an EventEmitter, start event, and end event. keeps timing information and streams it when useful.

usage

chronotrigger(emitter, start_event, end_event, optional_timeout)
  • emitter will have listeners attached for start_event and end_event
  • once enough data is available, an array will be streamed of: ["elapsed time from start to end", "elapsed time from end to next start"]
  • providing an optional third timeout argument will stream the timings after that timeout if the next event is not triggered within it.

example

var timings = require('chronotrigger'),
    fs = require('fs')

timings(mouse_event_emitter, 'mouseenter', 'mouseexit')
  .pipe(fs.createWriteStream('mouse-hover-times'))

license

MIT

Keywords

FAQs

Package last updated on 22 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc