Socket
Book a DemoInstallSign in
Socket

is-low-power-mode

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-low-power-mode

Check if the system is in low power mode

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

is-low-power-mode

Check if the system is in low power mode

Currently only supports macOS.

This can be useful to save battery, for example, by avoiding expensive operations or reducing polling intervals.

Install

npm install is-low-power-mode

Usage

import {isLowPowerMode} from 'is-low-power-mode';

console.log(await isLowPowerMode());
//=> false

API

isLowPowerMode(): Promise<boolean>

isLowPowerModeSync(): boolean

Returns a boolean indicating whether the system is in low power mode.

Always returns false on non-macOS systems.

Keywords

device

FAQs

Package last updated on 25 Jul 2024

Did you know?

Socket

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