Basic callbag factories and operators to get started with. Callbag is just a spec, but callbag-basics is a real library you can use. Imagine a hybrid between an Observable and an (Async)Iterable, that's what callbags are all about. In addition, the internals are tiny because it's all done with a few simple callbacks, following the callbag spec. As a result, it's tiny and fast.
callbacks reactive iterables observables callbag callback standard spec observable iterableRead also the announcement blog post and this introductory blog post. The capitalized keywords used here follow IETF's RFC 2119.
callbag callback standard spec observable iterableThe Interactive Extensions for JavaScript (IxJS) brings the Array#extras combinators to iterables, generators, async iterables and async generators. With the introduction of the Symbol.iterator and generators in ES2015, and subsequent introduction of Symbol.asyncIterator and async generators, it became obvious we need an abstraction over these data structures for composition, querying and more.IxJS unifies both synchronous and asynchronous pull-based collections, just as RxJS unified the world of push-based collections. RxJS is great for event-based workflows where the data can be pushed at the rate of the producer, however, IxJS is great at I/O operations where you as the consumer can pull the data when you are ready.
iterator iterable promise async asynciterable asynciteratorIterable Extensions for Java, the dual of RxJava. Originally implemented in the Reactive4Java framework, now standalone; no dependencies on any reactive library.The aim is to provide, lazily evaluated, pull-based datastream support with the same naming as in RxJava mainly for the pre-Java-8 world. The Stream API in Java 8 is not exactly the same thing because Streams can be only consumed once while Iterables can be consumed many times. Google Guava features a lot of Iterable operators, plus now they have the FluentIterable with similar setup but far less operators available.
iterable-extensions stream rxjava iterableReturns a Promise that is fulfilled when all promises returned from calling the functions in tasks are fulfilled, or rejects if any of the promises reject. The fulfilled value is the value returned from the last task.Functions are expected to return a value. If a Promise is returned, it's awaited before continuing with the next task.
promise waterfall series serial sequence sequential ordered task tasks array collection iterable iterator async await promises bluebirditerum library provides a class for handling iterable transformations inspired in Array methods and lodash/fp functions. This library also supplies combinatorial functions like permutations, combinations, variations, product, power and powerSet that has a high computational cost but this library is able to support taking advantage of lazy evaluation.Then, obj can be processed as an ordered list of values. However, unlike built-in iterables (Array, Set, Map, String, etc), obj is a lazy iterable. It means that, thanks to generators, obj does not store the computed values in memory and its values are computed just when are required. These are the essential features for implementing lazy evaluation.
functional lazy-evaluation iterator iterable inmutable array lazy es6 es2015Similar to Promise.all(), but accepts functions instead of promises directly so you can limit the concurrency.If you're doing the same work in each function, use p-map instead.
promise all function func fn limited limit control rate collection iterable iterator fulfilled async await promises concurrent concurrently concurrency parallel bluebirdUseful as a side-effect iterator. Prefer p-map if you don't need side-effects, as it's concurrent.Returns a Promise that is fulfilled when all promises in input and ones returned from iterator are fulfilled, or rejects if any of the promises reject. The fulfillment value is the original input.
promise foreach for-each for each collection iterable iterator fulfilled async await promises serial serially series bluebirdUseful when you need to run promise-returning & async functions multiple times with different inputs concurrently and get a filtered down result.Returns a Promise that is fulfilled when all promises in input and ones returned from filterer are fulfilled, or rejects if any of the promises reject. The fulfilled value is an Array of the fulfilled values returned from filterer in input order.
promise filter collection iterable iterator fulfilled async await promises concurrently concurrency parallel bluebirdThink of it like an async version of Array#find.Here we find the first file that exists on disk, in array order.
promise locate find finder search searcher test array collection iterable iterator race fulfilled fastest async await promises bluebirdUseful when you need to run promise-returning & async functions multiple times with different inputs concurrently.Returns a Promise that is fulfilled when all promises in input and ones returned from mapper are fulfilled, or rejects if any of the promises reject. The fulfilled value is an Array of the fulfilled values returned from mapper in input order.
promise async-functions concurrency mapper nodejs parallel promises async async-await await iteration map resolved wait collection iterable iterator race fulfilled concurrently bluebirdUseful as a side-effect mapper. Use p-map if you don't need side-effects, as it's concurrent.Returns a Promise that is fulfilled when all promises in input and ones returned from mapper are fulfilled, or rejects if any of the promises reject. The fulfilled value is an Array of the mapper created promises fulfillment values.
promise map collection iterable iterator fulfilled serial serially async await promises bluebirdUseful when you need to calculate some accumulated value based on async resources.Returns a Promise that is fulfilled when all promises in input and ones returned from reducer are fulfilled, or rejects if any of the promises reject. The fulfilled value is the result of the reduction.
promise reduce collection iterable iterator async await promises accumulate bluebirdIf you're doing the same work in each function, use p-each-series instead.See p-all for a concurrent counterpart.
promise series serial sequence sequential ordered task tasks array collection iterable iterator async await promises bluebirdHere we find the first file that exists on disk, in array order.Returns a Promise for the first path that exists or undefined if none exists.
locate path paths file files exists find finder search searcher array iterable iteratorCorrectly chunks up the input and handles backpressure.Adheres to the requested chunk size, except for array where each element will be a chunk.
stream buffer string object array iterable promise promises from into to transform convert readable pull gulpfriendly value strMore efficient than Array.from(iterable).length, as it only iterates the first item, which can make a big difference for dynamic iterators, like a Generator doing an expensive operation.Returns a boolean.
iterable empty iterables array size length list is check
We have large collection of open source products. Follow the tags from
Tag Cloud >>
Open source products are scattered around the web. Please provide information
about the open source projects you own / you use.
Add Projects.