MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modInstallBase64

Function modInstallBase64

modules/data/base64/modBase64.c:168–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void modInstallBase64(xsMachine *the)
169{
170 #define kNamespace (0)
171 #define kScratch (1)
172
173 xsBeginHost(the);
174 xsmcVars(2);
175
176 xsVar(kNamespace) = xsNewObject();
177 xsmcDefine(xsGlobal, xsID("Base64"), xsVar(kNamespace), xsDontEnum);
178 xsVar(kScratch) = xsNewHostFunction(xs_base64_encode, 1);
179 xsmcDefine(xsVar(kNamespace), xsID("encode"), xsVar(kScratch), xsDontEnum);
180 xsVar(kScratch) = xsNewHostFunction(xs_base64_decode, 1);
181 xsmcDefine(xsVar(kNamespace), xsID("decode"), xsVar(kScratch), xsDontEnum);
182
183 xsEndHost(the);
184}

Callers 1

fxBuildAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected