Skip to content

Access the system clipboard (copy/paste)

License

Notifications You must be signed in to change notification settings

mafintosh/clipboardy

 
 

Repository files navigation

clipboardy Build Status: macOS & Linux Build status: Windows

Access the system clipboard (copy/paste)

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

Install

$ npm install --save clipboardy

Linux users will probably have to install xsel: sudo apt install xsel

Usage

const clipboardy = require('clipboardy');

clipboardy.writeSync('🦄');

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

API

clipboardy

.write(input)

Write (copy) to the clipboard asynchronously. Returns a Promise.

input

Type: string

.read()

Read (paste) from the clipboard asynchronously. Returns a Promise.

.writeSync(input)

Write (copy) to the clipboard synchronously.

input

Type: string

.read()

Read (paste) from the clipboard synchronously.

Related

License

MIT © Sindre Sorhus

About

Access the system clipboard (copy/paste)

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 96.5%
  • Visual Basic .NET 3.5%