MCPcopy Create free account
hub / github.com/davidkingzyb/SCAST / codePointToString

Function codePointToString

lib/acorn.js:288–293  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

286 }
287
288 function codePointToString(code) {
289 // UTF-16 Decoding
290 if (code <= 0xFFFF) { return String.fromCharCode(code) }
291 code -= 0x10000;
292 return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
293 }
294
295 var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
296

Callers 1

acorn.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected