8 lines
285 B
JavaScript
8 lines
285 B
JavaScript
const {EventEmitter} = require('events')
|
|
const {powerMonitor, PowerMonitor} = process.atomBinding('power_monitor')
|
|
|
|
// PowerMonitor is an EventEmitter.
|
|
Object.setPrototypeOf(PowerMonitor.prototype, EventEmitter.prototype)
|
|
EventEmitter.call(powerMonitor)
|
|
|
|
module.exports = powerMonitor
|