MCPcopy Create free account
hub / github.com/glideapps/quicktype / mapper

Function mapper

src/Strings.ts:153–169  ·  view source on GitHub ↗
(u: number)

Source from the content-addressed store, hash-verified

151 escaper: (codePoint: number) => string
152): (u: number) => string {
153 function mapper(u: number): string {
154 switch (u) {
155 case 0x5c:
156 return "\\\\";
157 case 0x22:
158 return '\\"';
159 case 0x0a:
160 return "\\n";
161 case 0x09:
162 return "\\t";
163 default:
164 if (printablePredicate(u)) {
165 return String.fromCharCode(u);
166 }
167 return escaper(u);
168 }
169 }
170 return mapper;
171}
172

Callers 3

computeAsciiMapFunction · 0.85
utf16ConcatMapFunction · 0.85
utf32ConcatMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…