@extremejs/utils - v1.0.0-beta.23
    Preparing search index...

    Function dropRight

    • It will create a slice of value (array/string) with n elements dropped from the end.

      Type Parameters

      • Value extends string | unknown[]

      Parameters

      • value: Value
      • n: number = 1

      Returns Value

      1.0.0

      drop([0, 1, 2, 3, 4, 5], 2); // => [0, 1, 2, 3]
      
      drop("012345"); // => "01234"
      
      drop("012345", 2); // => "0123"