index.js 216 B

12345678910111213
  1. module.exports = toArray
  2. function toArray(list, index) {
  3. var array = []
  4. index = index || 0
  5. for (var i = index || 0; i < list.length; i++) {
  6. array[i - index] = list[i]
  7. }
  8. return array
  9. }