MCPcopy Index your code
hub / github.com/json5/json5 / hexEscape

Function hexEscape

lib/parse.js:804–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

802}
803
804function hexEscape () {
805 let buffer = ''
806 let c = peek()
807
808 if (!util.isHexDigit(c)) {
809 throw invalidChar(read())
810 }
811
812 buffer += read()
813
814 c = peek()
815 if (!util.isHexDigit(c)) {
816 throw invalidChar(read())
817 }
818
819 buffer += read()
820
821 return String.fromCodePoint(parseInt(buffer, 16))
822}
823
824function unicodeEscape () {
825 let buffer = ''

Callers 1

escapeFunction · 0.85

Calls 3

peekFunction · 0.85
invalidCharFunction · 0.85
readFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…