Socket
Socket
Sign inDemoInstall

caffeinate

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    caffeinate

Prevent the system from going to sleep


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Install size
252 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 25 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc