Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@unction/arrayify

unctionjs11SEE LICENSE IN LICENSE7.13.0TypeScript support: included

Takes a value and turns it into an array of that value, unless the value is already an array

unction, functional

readme

@unction/arrayify

Tests Stability Dependencies

A => [A] | A

Takes a value and turns it into an array of that value, unless the value is already an array.

arrayify("a")

returns

["a"]
arrayify(["a"])

returns

["a"]