Last active
September 8, 2017 08:25
-
-
Save vshjxyz/fcba844ac37c23e9381d97367d9a2ad3 to your computer and use it in GitHub Desktop.
Mutator-io pipe example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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