toArray 转化为数组

console.info(_.toArray({ 'a': 1, 'b': 2 }));
// => [1, 2]
 
console.info(_.toArray('abc'));
// => ['a', 'b', 'c']
 
console.info(_.toArray(1));
// => []
 
console.info(_.toArray(null));
// => []
posted @ 2022-12-21 15:15  盘思动  阅读(19)  评论(0编辑  收藏  举报