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

Function generateCallForArgumentCount

static/word2md/mammoth.browser.js:7801–7813  ·  view source on GitHub ↗
(count)

Source from the content-addressed store, hash-verified

7799 var shouldProxyThis = typeof callback === "string" || receiver === THIS;
7800
7801 function generateCallForArgumentCount(count) {
7802 var args = argumentSequence(count).join(", ");
7803 var comma = count > 0 ? ", " : "";
7804 var ret;
7805 if (shouldProxyThis) {
7806 ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
7807 } else {
7808 ret = receiver === undefined
7809 ? "ret = callback({{args}}, nodeback); break;\n"
7810 : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
7811 }
7812 return ret.replace("{{args}}", args).replace(", ", comma);
7813 }
7814
7815 function generateArgumentSwitchCase() {
7816 var ret = "";

Callers 1

Calls 1

argumentSequenceFunction · 0.70

Tested by

no test coverage detected