UNPKG

rambdax

Version:

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

15 lines (13 loc) 307 B
export function where(conditions, input){ if (input === undefined){ return _input => where(conditions, _input) } let flag = true for (const prop in conditions){ const result = conditions[ prop ](input[ prop ]) if (flag && result === false){ flag = false } } return flag }