Skip to content

juliandavidmr/RxClipboard

Repository files navigation

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 })
Option Description Default
watch Modify the change verification time (ms) 200

License MIT Julian David - 2017

Releases

No releases published

Packages

No packages published