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

Function applyStringMapping

test/fixtures/snapshot/typescript.js:61999–62007  ·  view source on GitHub ↗
(symbol, str)

Source from the content-addressed store, hash-verified

61997 type;
61998 }
61999 function applyStringMapping(symbol, str) {
62000 switch (intrinsicTypeKinds.get(symbol.escapedName)) {
62001 case 0 /* IntrinsicTypeKind.Uppercase */: return str.toUpperCase();
62002 case 1 /* IntrinsicTypeKind.Lowercase */: return str.toLowerCase();
62003 case 2 /* IntrinsicTypeKind.Capitalize */: return str.charAt(0).toUpperCase() + str.slice(1);
62004 case 3 /* IntrinsicTypeKind.Uncapitalize */: return str.charAt(0).toLowerCase() + str.slice(1);
62005 }
62006 return str;
62007 }
62008 function getStringMappingTypeForGenericType(symbol, type) {
62009 var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
62010 var result = stringMappingTypes.get(id);

Callers 1

getStringMappingTypeFunction · 0.85

Calls 2

getMethod · 0.65
sliceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…