Skip to content

Helpers.compose()

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

A shortcut for compose functions in sync mode:

'use strict';

export default (...fns) => val => fns.reduce((acc, fn) => fn(acc), val);

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