once-upon

0.0.2 • Public • Published

once-upon

===========

Executes a callback at most once upon the first of any number of events.

example

var once = require('once-upon'); var E = require('events').EventEmitter;

onceUpon('SIGINT SIGTERM', process, function(){ console.log('I will be called at most once'); });

process.emit('SIGTERM'); // "I will be called at most once"

install

> npm install once-upon

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    3
  • 0.0.1
    1
  • 0.0.0
    1

Package Sidebar

Install

npm i once-upon

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • aaron
  • gjohnson