1.0.2 • Published 6 years ago

rxclipboard v1.0.2

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

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 -S

yarn

yarn add rxclipboard

Example

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 })
OptionDescriptionDefault
watchModify the change verification time (ms)200

License MIT Julian David - 2017