Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/arrays/insertAfterValue

Index

Functions

Functions

insertAfterValue

  • insertAfterValue<T>(arrayToInsertInto: T[], valueToInsert: T, valueToInsertAfter: T): T[]
  • Insert a value after a specific value. If the value to insert after is not found then the value to insert is added to the end of the array

    Type parameters

    • T

    Parameters

    • arrayToInsertInto: T[]

      The array to contain the new value

    • valueToInsert: T

      The value we want to insert

    • valueToInsertAfter: T

      The value that dictates the position of the new value

    Returns T[]

    Array of values with the newly inserted value

Generated using TypeDoc