MCPcopy Create free account
hub / github.com/microsoft/SandDance / fncall

Function fncall

docs/app/js/sanddance-app.js:144406–144413  ·  view source on GitHub ↗
(name, args, cast, type)

Source from the content-addressed store, hash-verified

144404};
144405function Functions(codegen1) {
144406 function fncall(name, args, cast, type) {
144407 let obj = codegen1(args[0]);
144408 if (cast) {
144409 obj = cast + "(" + obj + ")";
144410 if (cast.lastIndexOf("new ", 0) === 0) obj = "(" + obj + ")";
144411 }
144412 return obj + "." + name + (type < 0 ? "" : type === 0 ? "()" : "(" + args.slice(1).map(codegen1).join(",") + ")");
144413 }
144414 function fn(name, cast, type) {
144415 return (args)=>fncall(name, args, cast, type);
144416 }

Callers 1

fnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected