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

Function generateNameForModuleOrEnum

test/fixtures/snapshot/typescript.js:114600–114604  ·  view source on GitHub ↗

* Generates a unique name for a ModuleDeclaration or EnumDeclaration.

(node)

Source from the content-addressed store, hash-verified

114598 * Generates a unique name for a ModuleDeclaration or EnumDeclaration.
114599 */
114600 function generateNameForModuleOrEnum(node) {
114601 var name = getTextOfNode(node.name);
114602 // Use module/enum name itself if it is unique, otherwise make a unique variation
114603 return isUniqueLocalName(name, node) ? name : makeUniqueName(name);
114604 }
114605 /**
114606 * Generates a unique name for an ImportDeclaration or ExportDeclaration.
114607 */

Callers 1

generateNameForNodeFunction · 0.85

Calls 3

getTextOfNodeFunction · 0.85
isUniqueLocalNameFunction · 0.85
makeUniqueNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…