MCPcopy Index your code
hub / github.com/NoteProtocol/NoteWallet / interpolate

Function interpolate

src/utils.ts:37–42  ·  view source on GitHub ↗
(template: string, params: any)

Source from the content-addressed store, hash-verified

35}
36
37export function interpolate(template: string, params: any) {
38 const names = Object.keys(params);
39 const vals = Object.values(params);
40 // eslint-disable-next-line @typescript-eslint/no-implied-eval
41 return new Function(...names, `return \`${template}\`;`)(...vals);
42}
43
44export function assert(arg0: boolean, arg1?: string) {
45 if (!arg0) {

Callers 1

processCommandMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected