Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

reassignment because troll #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions invoke.js
Expand Up @@ -6,10 +6,10 @@ var __slice = Array.prototype.slice;
* @param {String} method
* @return {Function}
*/
module.exports = function (method /*, ...args */) {
var args = __slice.call(arguments, 1);
module.exports = function (method, args /* ...args */) {
args = __slice.call(arguments, 1);

return function (obj /*, ..args */) {
return function (obj /*, ...arguments */) {
return obj[method].apply(obj, args.concat(__slice.call(arguments, 1)));
};
};