Access the system clipboard (copy/paste)
Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with Termux.
$ npm install clipboardy
const clipboardy = require('clipboardy');
clipboardy.writeSync('🦄');
clipboardy.readSync();
//=> '🦄'
Write (copy) to the clipboard asynchronously. Returns a Promise
.
Type: string
The text to write to the clipboard.
Read (paste) from the clipboard asynchronously. Returns a Promise
.
Write (copy) to the clipboard synchronously.
Type: string
The text to write to the clipboard.
Read (paste) from the clipboard synchronously.
MIT © Sindre Sorhus