MCPcopy Create free account
hub / github.com/dchester/jsonpath / scanHexEscape

Function scanHexEscape

jsonpath.js:522–535  ·  view source on GitHub ↗
(prefix)

Source from the content-addressed store, hash-verified

520 }
521
522 function scanHexEscape(prefix) {
523 var i, len, ch, code = 0;
524
525 len = (prefix === 'u') ? 4 : 2;
526 for (i = 0; i < len; ++i) {
527 if (index < length && isHexDigit(source[index])) {
528 ch = source[index++];
529 code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
530 } else {
531 return '';
532 }
533 }
534 return String.fromCharCode(code);
535 }
536
537 function getEscapedIdentifier() {
538 var ch, id;

Callers 3

getEscapedIdentifierFunction · 0.85
scanStringLiteralFunction · 0.85
scanRegExpFlagsFunction · 0.85

Calls 1

isHexDigitFunction · 0.85

Tested by

no test coverage detected