Created
March 4, 2012 20:44
-
-
Save koistya/1974712 to your computer and use it in GitHub Desktop.
Convert an array-like object to a true array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A utility function to convert an array-like object (or suffix of it) to a true array. | |
*/ | |
function (arr, start /* optional */) { | |
return Array.prototype.slice.call(arr, start || 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment