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.

13 lines
216 B

4 years ago
  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. }