UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

12 lines (9 loc) 279 B
import { any } from './any.js' import { check } from './ok.js' export function pass(...inputs){ return (...schemas) => any((x, i) => { const schema = schemas[ i ] === undefined ? schemas[ 0 ] : schemas[ i ] return !check(x, schema) }, inputs) === false }