UNPKG

@yobta/validator

Version:
8 lines (7 loc) 199 B
import { rule } from '../rule/rule.js'; export const pipe = (...rules) => rule((input, context) => { for (const test of rules) { input = test(context)(input); } return input; });