- Published on
Handling System Clipboard (Copy/Paste) Operations in Node.js
- Authors
- Name
- Ashik Nesin
- @AshikNesin
Ever wanted to access the system clipboard in your Node.js script?
With the help of clipboardy npm package, we can easily perform those operations.
Dependency
npm install clipboardy
Snippet
import clipboard from 'clipboardy';
clipboard.writeSync('Hello World');
clipboard.readSync(); // "Hello World"
Check out their docs for more snippets and methods to use clipboardy.
Happy copy-pasting texts!