MCPcopy Index your code
hub / github.com/markdown-it/markdown-it / fromCodePoint

Function fromCodePoint

lib/common/utils.mjs:60–70  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

58}
59
60function fromCodePoint (c) {
61 /* eslint no-bitwise:0 */
62 if (c > 0xffff) {
63 c -= 0x10000
64 const surrogate1 = 0xd800 + (c >> 10)
65 const surrogate2 = 0xdc00 + (c & 0x3ff)
66
67 return String.fromCharCode(surrogate1, surrogate2)
68 }
69 return String.fromCharCode(c)
70}
71
72const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g
73const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi

Callers 4

entityFunction · 0.90
replaceEntityPatternFunction · 0.85
isPunctCharCodeFunction · 0.85
utils.test.mjsFile · 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…