diff --git a/lib/utils.js b/lib/utils.js index 976ca6c0..7764b45e 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -11,7 +11,6 @@ define( function(debug) { 'use strict'; - var arry = []; var DEFAULT_INTERVAL = 100; function canWriteProtect() { @@ -35,7 +34,12 @@ define( }, toArray: function(obj, from) { - return arry.slice.call(obj, from); + from = from || 0; + var len = obj.length, arr = new Array(len - from); + for (var i = from; i < len; i++) { + arr[i - from] = obj[i]; + } + return arr; }, // returns new object representing multiple objects merged together