UNPKG

rambdax

Version:

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

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