MCPcopy Index your code
hub / github.com/nodejs/node / internIdentifier

Function internIdentifier

test/fixtures/snapshot/typescript.js:32353–32359  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

32351 return finishNode(result, pos);
32352 }
32353 function internIdentifier(text) {
32354 var identifier = identifiers.get(text);
32355 if (identifier === undefined) {
32356 identifiers.set(text, identifier = text);
32357 }
32358 return identifier;
32359 }
32360 // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues
32361 // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for
32362 // each identifier in order to reduce memory consumption.

Callers 6

createIdentifierFunction · 0.85
parsePropertyNameWorkerFunction · 0.85
parseModuleSpecifierFunction · 0.85
parseJSDocIdentifierNameFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…