
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
transduce-async
Advanced tools
Use Transducers with async iterators and observables by supporting Promises in iterators and transformers. Inspired by this talk from Erik Meijer.
Works with transduce, transducers-js or transducers.js.
Also works with any-promise library (a pollyfill, es6-promise, promise, native-promise-only, bluebird, rsvp, when, q).
Just install your transducers and Promise library preference and it will be auto detected and used.
API:
defer: function();
delay: function(wait);
compose: function(/*args*/);
transduce: function(xf, f, init, coll);
reduce: function(f, init, coll);
toArray: function(xf?, coll);
Create a deferred transducer that allows wrapped transformer to step or result a Promise in addition to a value. All items will be queued and processed in order. The wrapped transformer is called with value of resolved Promise.
Create a deferred transducer that delays step of wrapped transformer by wait milliseconds. All items will be queued and delayed and step will return a promise that will resolve after wait milliseconds for each item.
Like a normal compose, except all arguments are interleaved with defer. This allows any transducer in composed pipeline to step or result a Promise in addition to a value. The wrapped transformer is called with value of resolved Promise.
Like a normal transduce, except init and coll can be a Promise and xf can be a deferred transducer. The value of coll can be anything that can be converted to an iterator. The return value is a Promise for the result of the transformation.
Like a normal reduce, except init and coll can be a Promise and xf can be a deferred transducer. The value of coll can be anything that can be converted to an iterator. The return value is a Promise for the result of the reduction.
Convenience function to transduce into an array with an optional transformation. The return value is a Promise for an array.
FAQs
Deprecated: merged into transduce
We found that transduce-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.