Edit this page

up.util up.util.wrapList(value)
JavaScript function

This feature is experimental. It may be changed or removed in a future version.

Returns the given value if it is array-like, otherwise returns an array with the given value as its only element.

Example

up.util.wrapList([1, 2, 3]) // => [1, 2, 3]
up.util.wrapList('foo') // => ['foo']

Parameters

value any

Return value

ArrayorNodeListorjQuery
This website uses cookies to improve usability and analyze traffic.
I accept or learn more