Tweakr
    Preparing search index...

    Function pull

    • Creates a new array excluding all given values.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The source array to filter.

      • ...values: T[]

        The values to exclude from the new array.

      Returns T[]

      A new array excluding the specified values.

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

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

      1.0.0