0.2.3 • Published 4 years ago

clipboard-listener v0.2.3

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

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);
});