Detection for computer waking up from sleep.
Last updated 7 years ago by henrikjoreteg .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install wake-event 
SYNC missed versions from official npm registry.


Simple browserify module based on this clever trick by Alex MacCaw.

It simply exports a single function that you can pass a callback to.

When your computer wakes from sleep your callback will be called.

If you're not using a module system or using AMD use the wake-event.bundle.js file instead.

var wakeEvent = require('wake-event');

wakeEvent(function () {
    console.log('computer woke up!');

If you're not using a module system at all, use Alex's jQuery plugin or just include the bundle file by itself.

<script src="wake-event.bundle.js"></script>
    wakeEvent(function () {
        console.log('computer awake!');


npm install wake-event


Props for the core idea to Alex. Written by @HenrikJoreteg.



Current Tags

  • 0.0.1                                ...           latest (7 years ago)

1 Versions

  • 0.0.1                                ...           7 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |