Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function findSplice

    • Find an element within the Array and remove it from the array

      Type Parameters

      • T

      Parameters

      • find: (element: T) => boolean

        A function to use as input to findIndex

      • Optionalreplace: T

        A replacement for the spliced element

      Returns T | null

      The replacement element, the removed element, or null if no element was found.

      Array#splice