Skip to content

Commit

Permalink
Review markups
Browse files Browse the repository at this point in the history
 - Clean up `arguments` -> `Array`
  • Loading branch information
alecgibson committed Aug 27, 2024
1 parent e81522f commit 599d175
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ exports.clone = function(obj) {
exports.deduplicateRequests = function(fn) {
var callbacksByArgs = {};
return function() {
var callback = arguments[arguments.length - 1];
var args = [];
for (var i = 0; i < arguments.length - 1; i++) {
args.push(arguments[i]);
}
var args = Array.prototype.slice.call(arguments);
var callback = args.pop();
var argString = JSON.stringify(args);

var callbacks = exports.digOrCreate(callbacksByArgs, argString, function() {
Expand Down

0 comments on commit 599d175

Please sign in to comment.