import {onionify} from './onionify'; export {StateSource, isolateSource, isolateSink} from './StateSource'; export {Instances, CollectionOptions, makeCollection} from './Collection'; export {Getter, Setter, Lens, Scope, Reducer, MainFn} from './types'; /** * Like `merge` in xstream, this operator blends multiple streams together, but * picks those streams from a stream of instances. * * The instances data structure has a sinks object for each instance. Use the * `selector` string to pick a stream from the sinks object of each instance, * then pickMerge will merge all those picked streams. * * @param {String} selector a name of a channel in a sinks object belonging to * each component in the collection of instances. * @return {Function} an operator to be used with xstream's `compose` method. */ export {pickMerge} from './pickMerge'; /** * Like `combine` in xstream, this operator combines multiple streams together, * but picks those streams from a stream of instances. * * The instances data structure has a sinks object for each instance. Use the * `selector` string to pick a stream from the sinks object of each instance, * then pickCombine will combine all those picked streams. * * @param {String} selector a name of a channel in a sinks object belonging to * each component in the collection of instances. * @return {Function} an operator to be used with xstream's `compose` method. */ export {pickCombine} from './pickCombine'; /** * Given a Cycle.js component that expects an onion state *source* and will * output onion reducer *sink*, this function sets up the state management * mechanics to accumulate state over time and provide the state source. It * returns a Cycle.js component which wraps the component given as input. * Essentially, it hooks up the onion sink with the onion source as a cycle. * * Optionally, you can pass a custom name for the onion channel. By default, * the name is 'onion' in sources and sinks, but you can change that to be * whatever string you wish. * * @param {Function} main a function that takes `sources` as input and outputs * `sinks`. * @param {String} name an optional string for the custom name given to the * onion channel. By default, it is 'onion'. * @return {Function} a component that wraps the main function given as input, * adding state accumulation logic to it. */ export default onionify;