Gravatar for undefined
4 Likes

Wraps a value with an array.

Use in your code Learn more
bit import bit.utils/array/make

makeArray (val:*) : [*]

Wraps a value with an array.

Example

makeArray(1) // => [1]
 makeArray([1]) // => [1]
 makeArray(null) // => []

Argument

val: *

Returns

[*]

Test Summary

#makeArray() should wrap an empty string with an arrayPass
#makeArray() should return an empty array as nil value was passedPass
#makeArray() should return the same array reference if an existing array was passedPass