UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

14 lines (11 loc) 243 B
export function rejectObject(predicate) { return obj => { const willReturn = {} for (const prop in obj) { if (!predicate(obj[prop], prop, obj)) { willReturn[prop] = obj[prop] } } return willReturn } }