node-clipboardy

1.0.3 • Public • Published

node-clipboardy

Access the system clipboard (copy/paste)

Only for node, and original copied source code: https://github.com/sindresorhus/clipboardy

Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with Termux.

Install

npm install node-clipboardy

Usage

var ncp = require('node-clipboardy');

ncp.writeSync('🦄');

ncp.readSync();
//=> '🦄'

API

clipboard

.write(text)

Write (copy) to the clipboard asynchronously.

Returns a Promise.

text

Type: string

The text to write to the clipboard.

.read()

Read (paste) from the clipboard asynchronously.

Returns a Promise.

.writeSync(text)

Write (copy) to the clipboard synchronously.

text

Type: string

The text to write to the clipboard.

.readSync()

Read (paste) from the clipboard synchronously.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i node-clipboardy

    Weekly Downloads

    2,835

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    913 kB

    Total Files

    12

    Last publish

    Collaborators

    • atageldi194229