Skip to content

Helpers.composeAsync()

Javi Jiménez edited this page Jun 26, 2016 · 1 revision

A shortcut for compose functions in async mode:

'use strict';

export default (...fns) => state => fns.reduce((promise, fn) => promise.then(fn), Promise.resolve(state));

Feel free to offer new features, improvements or anything you can think of. This project makes sense with your participation and experience using Ava.

Clone this wiki locally