]> khamidou — GitHub mirrors - electron.git/commitdiff
Update power-monitor.md
authorTom Moor <tom.moor@gmail.com>
Wed, 15 Apr 2015 15:17:10 +0000 (08:17 -0700)
committerTom Moor <tom.moor@gmail.com>
Wed, 15 Apr 2015 15:17:10 +0000 (08:17 -0700)
docs/api/power-monitor.md

index 9273e13d9a59f346f973c53db999a4457c251f71..4643110f35bbad3684df817e732f64e079c7183d 100644 (file)
@@ -8,10 +8,9 @@ An example is:
 
 ```javascript
 var app = require('app');
-var powerMonitor = require('power-monitor');
 
 app.on('ready', function() {
-  powerMonitor.on('suspend', function() {
+  require('power-monitor').on('suspend', function() {
     console.log('The system is going to sleep');
   });
 });