Skip to content

unctionjs/replaceWhen

Repository files navigation

@unction/replacewhen

Tests Stability Dependencies

PredicateFunctionType => B => Function

Replaces values in an functor with another value based on a predicate.

replaceWhen(isEven)(null)([1, 2, 3]) // [1, null, 3]