1.0.1 • Published 7 years ago

caffeinate v1.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

caffeinate

caffeinate is a system utility provided in macOS which prevents the system from sleeping indefinitely or on behalf of a utility.

usage

const caffeinate = require(`caffeinate`)

caffeinate({ pid: 45623 })
.then(caffeinatePid => console.log(caffeinatePid))
.catch(error => console.log(error))

api

caffeinate([options])

Spawns caffeinate. Resolves with the pid of the spawned caffeinate instance.

options can be any of those supported by caffeinate. For the sake of readability you can use timeout and pid in place of t and w respectively.

options-to-args handles the conversion of options into spawn args.

1.0.1

7 years ago

1.0.0

7 years ago

0.1.0

8 years ago

0.0.1

8 years ago