Converts value to an array.
value
The value to convert.
Returns the converted array.
5.6.0
toArray({ 'a': 1, 'b': 2 })// => [1, 2]toArray('abc')// => ['a', 'b', 'c']toArray(1)// => []toArray(null)// => [] Copy
toArray({ 'a': 1, 'b': 2 })// => [1, 2]toArray('abc')// => ['a', 'b', 'c']toArray(1)// => []toArray(null)// => []
Converts
value
to an array.