Turn an array like into an array
JavaScript
Latest commit 826e74b Mar 31, 2014 @Raynos Merge pull request #3 from podefr/master
Use [].slice.call instead of for loop
Failed to load latest commit information.
test Add tests and documentation; bump to 0.1.5 Mar 31, 2014
.gitignore first Sep 29, 2012
LICENCE first Sep 30, 2012
README.md Add tests and documentation; bump to 0.1.5 Mar 31, 2014
index.js fix Sep 30, 2012
package.json Add tests and documentation; bump to 0.1.5 Mar 31, 2014

README.md

to-array

Turn an array like into an array. Designed for browser support in older browsers.

Example

var toArray = require("to-array")
    , elems = document.links

var array = toArray(elems)

Can also return an array from a specific index

(function () {
  toArray(arguments, 2) // [3, 4]
})(1, 2, 3, 4)

Installation

npm install to-array

Contributors

MIT Licenced