Function: asArray()
asArray<
T
>(item
):T
[]
Returns an array with the item if it is a object/primitive, otherwise, if it is an array, returns the array itself.
Type Parameters
• T
Parameters
• item: T
| T
[]
array or single object/primitive
Returns
T
[]
an array with the object/primitive as the single element or the original array