Function ensureArray

Normalize an object to be an array if it isn't one.

  • Type Parameters

    • T

    Parameters

    • entryOrArray: undefined | T | T[]

      An object that could be an array of its type or just its type

    Returns T[]

    An array of the input element (which might be empty)