From 83aa9df1ee70b88e63e1e5bb474fd65f6196d5dc Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Fri, 28 Aug 2015 21:37:07 -0700 Subject: [PATCH] Standardize power-monitor --- docs/api/power-monitor.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/api/power-monitor.md b/docs/api/power-monitor.md index 4643110f35bb..c9a33cc1a128 100644 --- a/docs/api/power-monitor.md +++ b/docs/api/power-monitor.md @@ -1,10 +1,10 @@ # power-monitor -The `power-monitor` module is used to monitor the power state change. You can -only use it on the main process. You should not use this module until the `ready` -event of `app` module gets emitted. +The `power-monitor` module is used to monitor power state changes. You can +only use it on the main process. You should not use this module until the `ready` +event of the `app` module is emitted. -An example is: +For example: ```javascript var app = require('app'); @@ -16,18 +16,22 @@ app.on('ready', function() { }); ``` -## Event: suspend +## Events + +The `power-monitor` module emits the following events: + +### Event: 'suspend' Emitted when the system is suspending. -## Event: resume +### Event: 'resume' Emitted when system is resuming. -## Event: on-ac +### Event: 'on-ac' Emitted when the system changes to AC power. -## Event: on-battery +### Event: 'on-battery' Emitted when system changes to battery power.