Closed ORESoftware closed 7 years ago
I have this patch in my codebase
Function.prototype.adhere = function () { let self = this; let args1 = Array.from(arguments); return function () { let args2 = Array.from(arguments); return self.apply(this, args1.concat(args2)); } };
When I use Vorpal like so:
.action(function(args,cb){ console.log('args =>',args); cb(null); });
for args I get:
args => { options: {}, adhere: [Function] }
when I remove the adhere monkey-patch on Function.prototype, I get:
args => { options: {}}
the heck is going on? :)
I have this patch in my codebase
When I use Vorpal like so:
for args I get:
args => { options: {}, adhere: [Function] }
when I remove the adhere monkey-patch on Function.prototype, I get:
args => { options: {}}
the heck is going on? :)