mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(util) exec.with: arguments[0] -> slice.call(arguments)
This commit is contained in:
parent
256cf20ab6
commit
9ac3eeb332
1 changed files with 2 additions and 6 deletions
|
|
@ -273,13 +273,9 @@
|
|||
*/
|
||||
|
||||
exec.with = function(callback) {
|
||||
var result,
|
||||
bind = Function.bind;
|
||||
var args = [].slice.call(arguments, 1);
|
||||
|
||||
arguments[0] = null;
|
||||
result = bind.apply(callback, arguments);
|
||||
|
||||
return result;
|
||||
return callback.bind(null, args);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue