SyncChannel
A SyncChannel is a readable/writable communication channel. Communication is synchronous, i.e. the callback of a write gets called only when it's value has been read. Reading/writing from/to a SyncChannel can be aborted by calling the abort function returned by the read/write methods.
Installation
$ npm install sync-channel
Examples
read/write
var SyncChannel = ;var channel = ;channel;channel;
Aborting a read/write operation
var SyncChannel = ;var channel = ;var abortRead = channel;;;
tryRead
var SyncChannel = ;var channel = ;var result = channel;ifresult !== nullconsole;elseconsole;
tryWrite
var SyncChannel = ;var channel = ;var result = channel;ifresult === trueconsole;elseconsole;