Convert API
toArr()
Converts the passed arguments to an array.
- Accepts any arguments.
- Returns an array with the passed arguments.
Example:
toArr(1);
// [1]
toArr([1]);
// [1]
toArr(1, [2, [3, 4]]);
// [1, 2, [3, 4]]
toArr('book', 10, [1, 2], {key: 'value'}, $('body'));
// ['book', 10, 1, 2, {key: 'value'}, body]