bit/utils/array/make

converts val to an array

1 Likes
Use in your codeLearn more
bit import bit.utils/array/make

makeArray (val:*) :[*]

converts val to 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