toolish - v0.2.5
    Preparing search index...

    Function swapAllElementsBy

    • Replaces all array elements matching the predicate with the given replacement. For your convenience the given replacement value is also passed to the predicate as a second parameter, so you can easily compare the two if needed.

      Type Parameters

      • T

      Parameters

      Returns T[]

      the original replaced elements