Share your code. Components are building blocks, you are the architect.

array/make
v1.0.0
1.0.0
0.0.1
MIT
PUBLIC
1
1     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass
Wraps a value with an array.
bit
Contributors
Gravatar for undefinedGravatar for undefined
1

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use array/make in your project
npm i @bit/bit.utils.array.make
Copied

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