# @hensm/ddcci

> NodeJS DDC/CI library

Latest version **0.1.0** (published 2020-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hensm/ddcci
pnpm add @hensm/ddcci
yarn add @hensm/ddcci
bun add @hensm/ddcci
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-08-08 |
| First published | 2018-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 68 |
| Author | Matt Hensman |
| Maintainers | hensm |

## Links

- npm: https://www.npmjs.com/package/@hensm/ddcci
- Repository: https://github.com/hensm/node-ddcci
- Homepage: https://github.com/hensm/node-ddcci#readme
- Issues: https://github.com/hensm/node-ddcci/issues
- npm.io page: https://npm.io/package/@hensm/ddcci

## Dependencies (2)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [node-addon-api](https://npm.io/package/node-addon-api.md) ^2.0.0

## Recent versions

- 0.1.0 (latest) — 2020-08-08
- 0.0.4 — 2020-04-18
- 0.0.3 — 2018-06-08
- 0.0.2 — 2018-06-08
- 0.0.1 — 2018-06-08

## README

# node-ddcci

## Installation

node-ddcci is currently only supported on Windows.

````bash
npm install @hensm/ddcci
````

## Usage

````js
const ddcci = require("@hensm/ddcci");

for (const monitor of ddcci.getMonitorList()) {
    console.log(`${monitor} current brightness: ${ddcci.getBrightness(monitor)}`);
    ddcci.setBrightness(monitor, 25);
}
````

## Docs

* ### `getMonitorList()`
  Gets a list of the current connected monitors.
  * #### Return value
    An array of `String` containing the monitor names.

* ### `getBrightness(monitorName)`
  Queries a monitor's brightness level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to query the brightness.
  * #### Return value
    An `integer`, typically between 0-100, representing the current brightness.
    
* ### `getMaxBrightness(monitorName)`
  Queries a monitor's maximum brightness level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to query the brightness.
  * #### Return value
    An `integer`, typically between 0-100, representing the maximum brightness.

* ### `setBrightness(monitorName, level)`
  Sets a monitor's brightness level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to set the brightness.
    * **`level`**  
      &emsp;`integer`. Between 0-100 representing the new brightness level.

* ### `getContrast(monitorName)`
  Queries a monitor's contrast level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to query the contrast.
  * #### Return value
    An `integer`, typically between 0-100, representing the current contrast.
    
* ### `getMaxContrast(monitorName)`
  Queries a monitor's maximum contrast level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to query the contrast.
  * #### Return value
    An `integer`, typically between 0-100, representing the maximum contrast.

* ### `setContrast(monitorName, level)`
  Sets a monitor's contrast level.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to set the contrast.
    * **`level`**  
      &emsp;`integer`. Between 0-100 representing the new contrast level.

* ### `_getVCP(monitorName, vcpCode)`
  Queries a monitor for a VCP code value.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to query the VCP feature.
    * **`vcpCode`**  
      &emsp;`integer`. VCP code to query
  * #### Return value
    An `array` of two `integer` values in the format of `[currentValue, maxValue]`.

* ### `_setVCP(monitorName, vcpCode, value)`
  Sets the value of a VCP code for a monitor.
  * #### Parameters
    * **`monitorName`**  
      &emsp;`String`. Name of monitor for which to set the VCP feature.
    * **`vcpCode`**  
      &emsp;`integer`. VCP code to set.
    * **`value`**  
      &emsp;`integer`. Value of the VCP code.

* ### `_refresh()`
  Refreshes the monitor list.

---
_Source: https://npm.io/package/@hensm/ddcci · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
