Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

dark-mode

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dark-mode

Control the macOS dark mode

Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
465
-55.37%
Maintainers
1
Weekly downloads
 
Created
Source

node-dark-mode

Control the macOS dark mode

Requires macOS 10.10 or later.

Install

$ npm install --save dark-mode

Usage

const darkMode = require('dark-mode');

darkMode.enable().then(() => {
	console.log('Enabled dark mode');
});

darkMode.toggle().then(() => {
	console.log('Toggled between dark and light mode');
});

API

darkMode

All the methods return a Promise.

.enable()

.disable()

.toggle([force])

force

Type: boolean

Force a specific mode, true for dark and false for light.

.isDark()

Returns a Promise<boolean> of whether you're in dark mode.

  • dark-mode-cli - CLI for this module

License

MIT © Sindre Sorhus

Keywords

macos

FAQs

Package last updated on 05 Feb 2017

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