MCPcopy
hub / github.com/benjamn/recast / checkId

Function checkId

test/parser.ts:174–177  ·  view source on GitHub ↗
(s: any, loc: types.namedTypes.SourceLocation)

Source from the content-addressed store, hash-verified

172 assert.strictEqual(lines.length, 1);
173
174 function checkId(s: any, loc: types.namedTypes.SourceLocation) {
175 const sliced = lines.slice(loc.start, loc.end);
176 assert.strictEqual(s + "", sliced.toString());
177 }
178
179 types.visit(
180 parse(code, {

Callers 2

visitIdentifierFunction · 0.85
visitLiteralFunction · 0.85

Calls 2

toStringMethod · 0.65
sliceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…