Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Latest commit

 

History

History
45 lines (26 loc) · 583 Bytes

Readme.md

File metadata and controls

45 lines (26 loc) · 583 Bytes

status

User "active" / "idle" event emitter.

Example

var status = requrie('status');
status.watch();

status('idle', function(){
  console.log('idle!');
});

status('active', function(){
  console.log('active!');
});

Installation

$ component install yields/status

API

status.watch([timeout])

Start watching on mousemove and keyup the default timeout is 1 minute.

status.unwatch()

Stop watching mousemove and keyup.

status(event, fn)

Invoke fn on event.

Todo

  • add tests.

License

MIT