Skip to content

Commit

Permalink
remove redundant copying to array
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Jun 10, 2019
1 parent c473479 commit 106fae3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/rsvp/node.js
Expand Up @@ -7,16 +7,10 @@ import {

function makeObject(_, argumentNames) {
let obj = {};
let length = _.length;
let args = new Array(length);

for (let x = 0; x < length; x++) {
args[x] = _[x];
}

for (let i = 0; i < argumentNames.length; i++) {
let name = argumentNames[i];
obj[name] = args[i + 1];
obj[name] = _[i + 1];
}

return obj;
Expand Down

0 comments on commit 106fae3

Please sign in to comment.