Keep the value if predicate holds; otherwise collapse to none. Supports data-first and curried (pipe-friendly) forms.
predicate
const adult = pipe( fromNullable(user.age), filter((age) => age >= 18), ) Copy
const adult = pipe( fromNullable(user.age), filter((age) => age >= 18), )
Keep the value if
predicateholds; otherwise collapse to none. Supports data-first and curried (pipe-friendly) forms.