MCPcopy
hub / github.com/prettier/prettier / assertRaw

Function assertRaw

src/language-js/parse/postprocess/index.js:265–272  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

263
264/* c8 ignore next */
265function assertRaw(node, text) {
266 if (!isNodeWithRaw(node)) {
267 return;
268 }
269
270 const raw = node.type === "TemplateElement" ? node.value.raw : getRaw(node);
271 assert.equal(raw, text.slice(locStart(node), locEnd(node)));
272}
273
274/**
275@param {Node} node

Callers 1

onLeaveFunction · 0.85

Calls 3

getRawFunction · 0.90
locStartFunction · 0.90
locEndFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…