# @valudio/native-clipboard

> Native node addon that provides tools to manage the clipboard on macos and windows

Latest version **0.0.1** (published 2019-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @valudio/native-clipboard
pnpm add @valudio/native-clipboard
yarn add @valudio/native-clipboard
bun add @valudio/native-clipboard
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-09-16 |
| First published | 2019-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 286.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marc Fuentes Montenegro |
| Maintainers | valudio |

## Links

- npm: https://www.npmjs.com/package/@valudio/native-clipboard
- npm.io page: https://npm.io/package/@valudio/native-clipboard

## Recent versions

- 0.0.1 (latest) — 2019-09-16

## README

# Native clipboard node module (Macos and Windows)

Native node addon that allows you to manage the clipboard. Mainly to be used with [Electron](https://github.com/electron/electron).

## Installation

This module is installed via npm:

```
npm install --save @valudio/native-clipboard
```

## Usage

```javascript
import nativeClipboard from '@valudio/native-clipboard'
```

## API

### nativeClipboard.getFromClipboard ()

Returns the current value on the clipboard.

```javascript
const clipboardValue = nativeClipboard.getFromClipboard()
```

### nativeClipboard.setToClipboard (value)

Sets a value on the clipboard.

```javascript
nativeClipboard.setToClipboard('this is a test')
console.log(nativeClipboard.getFromClipboard()) // this is a test
```

### nativeClipboard.setSelectionToClipboard ()

Set whatever is selected to the clipboard.

```javascript
nativeClipboard.setSelectionToClipboard()
```

## Supported OSes
 * Windows
 * macOS

## License
[MIT](LICENSE) © [Valudio](http://valudio.com)

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