MCPcopy
hub / github.com/Exrick/xpay / compileStyleMap

Function compileStyleMap

xpay-code/src/main/resources/static/swagger/swagger-ui.js:10278–10304  ·  view source on GitHub ↗
(schema, map)

Source from the content-addressed store, hash-verified

10276];
10277
10278function compileStyleMap(schema, map) {
10279 var result, keys, index, length, tag, style, type;
10280
10281 if (map === null) return {};
10282
10283 result = {};
10284 keys = Object.keys(map);
10285
10286 for (index = 0, length = keys.length; index < length; index += 1) {
10287 tag = keys[index];
10288 style = String(map[tag]);
10289
10290 if (tag.slice(0, 2) === '!!') {
10291 tag = 'tag:yaml.org,2002:' + tag.slice(2);
10292 }
10293
10294 type = schema.compiledTypeMap[tag];
10295
10296 if (type && _hasOwnProperty.call(type.styleAliases, style)) {
10297 style = type.styleAliases[style];
10298 }
10299
10300 result[tag] = style;
10301 }
10302
10303 return result;
10304}
10305
10306function encodeHex(character) {
10307 var string, handle, length;

Callers 1

StateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected