Skip to content

Instantly share code, notes, and snippets.

@vshjxyz
Last active September 8, 2017 08:25
Show Gist options
  • Save vshjxyz/fcba844ac37c23e9381d97367d9a2ad3 to your computer and use it in GitHub Desktop.
Save vshjxyz/fcba844ac37c23e9381d97367d9a2ad3 to your computer and use it in GitHub Desktop.
Mutator-io pipe example
import { Observable } from 'rxjs'
import {
MutatorIO,
InputStream,
OutputStream
} from 'mutator-io'
const myPipe = {
name: 'myPipeName',
in: {
create: () => Observable.of('My message', 'My other message')
} as InputStream,
out: {
create: () => (msg) => console.log(`Message arrived: ${msg}`)
} as OutputStream,
} as MutatorIO.Pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment