domutils
    Preparing search index...

    Function findOneChild

    • Finds the first element inside of an array that matches a test function. This is an alias for Array.prototype.find.

      Type Parameters

      • T

      Parameters

      • test: (elem: T) => boolean

        Function to test nodes on.

      • nodes: T[]

        Array of nodes to search.

      Returns undefined | T

      The first node in the array that passes test.

      Use Array.prototype.find directly.