(codePoint)
| 11 | const lowSurrogate = (codePoint) => ((codePoint - 0x10000) % 0x400) + 0xDC00; |
| 12 | |
| 13 | const codePointToString = (codePoint) => { |
| 14 | const string = String.fromCodePoint(codePoint); |
| 15 | // Important: escape RegExp meta-characters. |
| 16 | if (/[$()*+\-\./?\[\]^{|}]/.test(string)) { |
| 17 | return `\\${string}`; |
| 18 | } |
| 19 | return string; |
| 20 | }; |
| 21 | |
| 22 | const createRange = (codePoints) => { |
| 23 | // Does the range contain lone high surrogates? |
no outgoing calls
no test coverage detected
searching dependent graphs…