XuelesszzZ 94af2b8e7b 6-30-5 | 1 year ago | |
---|---|---|
.. | ||
fallbacks | 1 year ago | |
lib | 1 year ago | |
node_modules | 1 year ago | |
browser.js | 1 year ago | |
index.d.ts | 1 year ago | |
index.js | 1 year ago | |
license | 1 year ago | |
package.json | 1 year ago | |
readme.md | 1 year ago |
Access the system clipboard (copy/paste)
Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with Termux, modern browsers.
$ 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.
Doesn't work in browsers.
Type: string
The text to write to the clipboard.
Read (paste) from the clipboard synchronously.
Doesn't work in browsers.
The Linux binary is just a bundled version of xsel
. The source for the Windows binary can be found here.