array/make
v0.0.1
0.0.1
Collaborators
Gravatar for undefined
0
MIT
PUBLIC
0
1     DEPENDENCIES
BuildPass

Wraps a value with an array.

Use array/make in your project
npm i @bit/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