es-grid-template
Version:
es-grid-template
13 lines (12 loc) • 354 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = applyTransforms;
/**
* Apply transforms in sequence to the input.
*
* `applyTransforms(input, f1, f2, f3)` is equivalent to `f3(f2(f1(input)))` */
function applyTransforms(input, ...transforms) {
return transforms.reduce((v, fn) => fn(v), input);
}