toArray()

Turns anything into an array.

This function is valid in v2.0.0 to v2.22.1. This function has been downloaded 43 times.

Parameter

{*=} o Optional
Any value to either convert to an array or wrap in an array.

Returns

{Array}
If no arguments were passed an empty array is returned. If the argument passed was array-like it will be returned as an Array. Otherwise the argument passed will simply be returned within an array.

Required Functions

This function directly requires the following functions which are included automatically:

  • isArrayLike()
    Determines if an object is an array or at least array-like.
  • slice()
    Slice does not modify the original array, but instead returns a shallow copy of elements from the original array.

Requiring Function

This function is directly required by the following function:

  • dom()
    Creates HTML DOM objects.