Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
LICENSE
README.md
index.js
package.json

README.md

idle

Trigger a listener that fires only when a certain event has not occured within a time window.

Example

var idle = require ('idle')

idle(emitter, 'okay',  10*1000, function onIdle () {
  //this function will be called when 'okay'
  //has not been emitted within 10 seconds.
  console.log('NOT OKAY')

  //you can still clear the timeout in the normal way
  emitter.removeListener('okay', onIdle)
})

License

MIT

Something went wrong with that request. Please try again.