# node-electron-clipboard

> > Use electron's clipboard api under the hood to bring cross platform `writeText` and `writeImage` to node.js

Latest version **0.2.0** (published 2018-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-electron-clipboard
pnpm add node-electron-clipboard
yarn add node-electron-clipboard
bun add node-electron-clipboard
```

## 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.2.0 |
| Published | 2018-10-20 |
| First published | 2018-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 269.9 KB |
| Known vulnerabilities | 0 (+47 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | maple3142 |

## Links

- npm: https://www.npmjs.com/package/node-electron-clipboard
- npm.io page: https://npm.io/package/node-electron-clipboard

## Dependencies (7)

- [express](https://npm.io/package/express.md) ^4.16.4
- [electron](https://npm.io/package/electron.md) ^3.0.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.0
- [xfetch-js](https://npm.io/package/xfetch-js.md) ^0.2.1
- [JSONStream](https://npm.io/package/JSONStream.md) ^1.3.4
- [body-parser](https://npm.io/package/body-parser.md) ^1.18.3
- [tmp-promise](https://npm.io/package/tmp-promise.md) ^1.0.5

## Recent versions

- 0.2.0 (latest) — 2018-10-20
- 0.1.0 — 2018-10-18

## README

# node-electron-clipboard

> Use electron's clipboard api under the hood to bring cross platform `writeText` and `writeImage` to node.js

## API

```ts
type imgType = 'PNG' | 'JPEG'
interface Clipboard {
  writeText(text: string): Promise<boolean>
  writeImage(path: string): Promise<boolean>
  writeImage(img: Buffer): Promise<boolean>
  readText(): Promise<string>
  readImage(type?: imgType): Promise<Buffer> // Use PNG if type is not provided
  clear(type: string): Promise<boolean>
  close(): void
}
type initClipboard = () => Promise<Clipboard>
declare const init: initClipboard
export = init
```

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