You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
243 B
16 lines
243 B
5 months ago
|
var map = require('./map')
|
||
|
|
||
|
/**
|
||
|
* 将对象或者伪数组转为新数组
|
||
|
*
|
||
|
* @param {Array} list 数组
|
||
|
* @return {Array}
|
||
|
*/
|
||
|
function toArray (list) {
|
||
|
return map(list, function (item) {
|
||
|
return item
|
||
|
})
|
||
|
}
|
||
|
|
||
|
module.exports = toArray
|