# idle

> Trigger a listener that fires only when a certain event _has not_ occured within a time window.

Latest version **0.0.0** (published 2012-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install idle
pnpm add idle
yarn add idle
bun add idle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2012-10-26 |
| First published | 2012-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | 'Dominic Tarr' |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/idle
- Repository: https://github.com/dominictarr/idle
- npm.io page: https://npm.io/package/idle

## Recent versions

- 0.0.0 (latest) — 2012-10-26

## README

# idle

Trigger a listener that fires only when a certain event 
_has not_ occured within a time window.

## Example

``` js
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

---
_Source: https://npm.io/package/idle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
