Yamato DaiwaE(CMA)S(cript) extensions

getIndexOfArrayElementSatisfiesThePredicateIfSuchElementIsExactlyOne

Overload No. 1
If the number of elements that satisfy the predicate is 0 or more than 1, null will be returned
<ArrayElement>
(
):ArrayElement | null
Overload No. 2
If the number of elements that satisfy the predicate is 0 or more than 1, an error will be thrown
<ArrayElement>
(
):ArrayElement
Options
{
mustThrowErrorIfElementNotFoundOrMatchesAreMultiple
}

External Links