rxclipboard
v1.0.2
Published
Clipboard reactive to changes for Node
Readme
RxClipboard
Clipboard reactive to changes for Node.
Detects when the clipboard changes, regardless of the type of content. It does this by wrapping pbcopy / pbpaste (for OSX), xclip (for Linux and OpenBSD), and clip (for Windows).
Require Node v7 o later
Install
npm
npm i rxclipboard -Syarn
yarn add rxclipboardExample
const rxclipboard = require('rxclipboard')
const log = console.log
rxclipboard.watchClipboard().subscribe(
x => log('onNext: %s', x),
e => log('onError: %s', e),
() => log('onCompleted'))Import using babel
import * as rxclipboard from "rxclipboard"API
rxclipboard.watchClipboard( /* { options } */)
// Example
rxclipboard.watchClipboard({ watch: 200 })| Option | Description | Default |
|--------|------------------------------------------|---------|
| watch | Modify the change verification time (ms) | 200 |
License MIT Julian David - 2017
