diff --git a/lib/utils/index.js b/lib/utils/index.js index 26b8a9e6..573de2af 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -170,13 +170,10 @@ exports.timeout = function (callback, timeout) { */ exports.convertObjectToArray = function (obj) { var result = []; - var pos = 0; for (var key in obj) { if (obj.hasOwnProperty(key)) { - result[pos] = key; - result[pos + 1] = obj[key]; + result.push(key, obj[key]); } - pos += 2; } return result; };