MCPcopy Create free account
hub / github.com/TruthHun/BookStack / makeMethodCaller

Function makeMethodCaller

static/word2md/mammoth.browser.js:4301–4317  ·  view source on GitHub ↗
(methodName)

Source from the content-addressed store, hash-verified

4299var getGetter;
4300if (!false) {
4301var makeMethodCaller = function (methodName) {
4302 return new Function("ensureMethod", " \n\
4303 return function(obj) { \n\
4304 'use strict' \n\
4305 var len = this.length; \n\
4306 ensureMethod(obj, 'methodName'); \n\
4307 switch(len) { \n\
4308 case 1: return obj.methodName(this[0]); \n\
4309 case 2: return obj.methodName(this[0], this[1]); \n\
4310 case 3: return obj.methodName(this[0], this[1], this[2]); \n\
4311 case 0: return obj.methodName(); \n\
4312 default: \n\
4313 return obj.methodName.apply(obj, this); \n\
4314 } \n\
4315 }; \n\
4316 ".replace(/methodName/g, methodName))(ensureMethod);
4317};
4318
4319var makeGetter = function (propertyName) {
4320 return new Function("obj", " \n\

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected