Skip to content

Commit

Permalink
Unshifting instead of pushing when removing duplicates.
Browse files Browse the repository at this point in the history
* I don't believe this matters, but it's good to be consistent.
  • Loading branch information
jsdevel committed Feb 4, 2016
1 parent 0e629ab commit 9a0ac20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ function withNoDuplicates(arr) {
}

seenParams[key] = true;
parameters.push(item);
// unshifting to preserve ordering. I don't believe it matters, but good to be
// consistent.
parameters.unshift(item);
} while(--index > 0);

return parameters;
Expand Down

0 comments on commit 9a0ac20

Please sign in to comment.