Permalink
Browse files

Faster utils.toProperArray()

  • Loading branch information...
1 parent f03493e commit 4317f4eabc2e43dbe14b344e385a104eb9c3c171 @cdauth cdauth committed Jun 11, 2013
Showing with 1 addition and 4 deletions.
  1. +1 −4 utils.js
View
@@ -55,10 +55,7 @@ function indexOf(buffer, charCode)
}
function toProperArray(arr) {
- var ret = [ ];
- for(var i=0; i<arr.length; i++)
- ret.push(arr[i]);
- return ret;
+ return Array.prototype.slice.call(arr);
}
function proxy(context, func) {

0 comments on commit 4317f4e

Please sign in to comment.