|
|
3 роки тому | |
|---|---|---|
| .. | ||
| fallbacks | 3 роки тому | |
| lib | 3 роки тому | |
| node_modules | 3 роки тому | |
| browser.js | 3 роки тому | |
| index.d.ts | 3 роки тому | |
| index.js | 3 роки тому | |
| license | 3 роки тому | |
| package.json | 3 роки тому | |
| readme.md | 3 роки тому | |
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.