<commit_before># do-not-disturb [![Build Status](https://travis-ci.org/sindresorhus/do-not-disturb.svg?branch=master)](https://travis-ci.org/sindresorhus/do-not-disturb)

> Control the macOS `Do Not Disturb` feature

Note that this package does not work inside a [sandboxed](https://developer.apple.com/app-sandboxing/) app.


## Install

```
$ npm install @sindresorhus/do-not-disturb
```


## Usage

```js
const doNotDisturb = require('@sindresorhus/do-not-disturb');

(async () => {
	await doNotDisturb.enable();
})();
```


## API

### doNotDisturb

All the methods return a `Promise`. You only really need to `await` them if you use multiple methods at once.

#### .enable()

#### .disable()

#### .toggle([force])

##### force

Type: `boolean`

Force it to be enabled/disabled.

#### .isEnabled(): `Promise<boolean>`


## Related

- [do-not-disturb-cli](https://github.com/sindresorhus/do-not-disturb-cli) - CLI for this module
- [dark-mode](https://github.com/sindresorhus/dark-mode) - Control the macOS dark mode
- [file-icon](https://github.com/sindresorhus/file-icon) - Get the icon of a file or app as a PNG image
- [app-path](https://github.com/sindresorhus/app-path) - Get the path to an app
<commit_msg>Add more related links to the readme<commit_after># do-not-disturb [![Build Status](https://travis-ci.org/sindresorhus/do-not-disturb.svg?branch=master)](https://travis-ci.org/sindresorhus/do-not-disturb)

> Control the macOS `Do Not Disturb` feature

Note that this package does not work inside a [sandboxed](https://developer.apple.com/app-sandboxing/) app.


## Install

```
$ npm install @sindresorhus/do-not-disturb
```


## Usage

```js
const doNotDisturb = require('@sindresorhus/do-not-disturb');

(async () => {
	await doNotDisturb.enable();
})();
```


## API

### doNotDisturb

All the methods return a `Promise`. You only really need to `await` them if you use multiple methods at once.

#### .enable()

#### .disable()

#### .toggle([force])

##### force

Type: `boolean`

Force it to be enabled/disabled.

#### .isEnabled(): `Promise<boolean>`


## Related

- [do-not-disturb-cli](https://github.com/sindresorhus/do-not-disturb-cli) - CLI for this module
- [dark-mode](https://github.com/sindresorhus/dark-mode) - Control the macOS dark mode
- [macos-wallpaper](https://github.com/sindresorhus/macos-wallpaper) - Manage the desktop wallpaper
- [file-icon](https://github.com/sindresorhus/file-icon) - Get the icon of a file or app as a PNG image
- [app-path](https://github.com/sindresorhus/app-path) - Get the path to an app
- [More…](https://github.com/search?q=user%3Asindresorhus+language%3Aswift)

{'fraction_non_alphanumeric': 0.17546524876566655, 'fraction_numerical': 0.0007595898214963919, 'mean_word_length': 4.268, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3765177', 'n_tokens_mistral': 962, 'n_tokens_neox': 933, 'n_words': 214}