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
Read (paste) from the clipboard asynchronously. Returns a Promise
.
Write (copy) to the clipboard synchronously.
Type: string
Read (paste) from the clipboard synchronously.
- clipboard-cli - CLI for this module
- copy-text-to-clipboard - Copy text to the clipboard in the browser
MIT ยฉ Sindre Sorhus