Tweakr
    Preparing search index...

    Function pullAll

    • Creates a new array excluding all values present in the given array of values.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The source array to filter.

      • values: T[]

        The array of values to exclude from the new array.

      Returns T[]

      A new array excluding all specified values.

      pullAll([1, 2, 3, 4], [2, 4]);
      // → [1, 3]

      pullAll(["a", "b", "c"], ["a"]);
      // → ["b", "c"]

      1.0.0