clipboard-listener
v0.2.3
Published
Node.js event listener for clipboard changes.
Downloads
18
Maintainers
Readme
clipboard-listener
Node.js event listener for clipboard changes.
Clipboard-listener uses the node-copy-paste package to get the data from clipboard.
Installation
To install the clipboard-listener, you can either use npm or GitHub.
npm install clipboard-listener
or
git clone https://github.com/venomaze/clipboard-listener.git
Usage
const ClipboardListener = require('clipboard-listener');
/*
* Create a new instance
*/
const listener = new ClipboardListener({
timeInterval: 100, // Default to 250
immediate: true, // Default to false
});
/*
* Start listening to clipboard changes
*/
listener.on('change', value => {
console.log(value);
});