caoge c760052ff9 机车状态修改 | 8 ヶ月 前 | |
---|---|---|
.. | ||
fallbacks | 8 ヶ月 前 | |
lib | 8 ヶ月 前 | |
node_modules | 8 ヶ月 前 | |
browser.js | 8 ヶ月 前 | |
index.d.ts | 8 ヶ月 前 | |
index.js | 8 ヶ月 前 | |
license | 8 ヶ月 前 | |
package.json | 8 ヶ月 前 | |
readme.md | 8 ヶ月 前 |
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.