caller.js 224 B

1234567
  1. module.exports = function (methodName, numArgs) {
  2. return numArgs == 1 ? function (object, arg) {
  3. return object[methodName](arg);
  4. } : function (object, arg1, arg2) {
  5. return object[methodName](arg1, arg2);
  6. };
  7. };