MCPcopy
hub / github.com/witheve/Eve / test

Method test

src/runtime/providers/string.ts:102–111  ·  view source on GitHub ↗
(prefix)

Source from the content-addressed store, hash-verified

100 }
101
102 test(prefix) {
103 let {args, returns} = this.resolve(prefix);
104 let from = 0;
105 let text = args[0];
106 if(typeof text !== "string") return false;
107 let to = text.length;
108 if (args[1] != undefined) from = args[1] - 1;
109 if (args[2] != undefined) to = args[2];
110 return text.substring(from, to) === returns[0];
111 }
112
113 // substring always returns cardinality 1
114 getProposal(tripleIndex, proposed, prefix) {

Callers

nothing calls this directly

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected