(c)
| 42 | } |
| 43 | |
| 44 | function isValidEntityCode (c) { |
| 45 | // broken sequence |
| 46 | if (c >= 0xD800 && c <= 0xDFFF) { return false } |
| 47 | // never used |
| 48 | if (c >= 0xFDD0 && c <= 0xFDEF) { return false } |
| 49 | if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false } |
| 50 | // control codes |
| 51 | if (c >= 0x00 && c <= 0x08) { return false } |
| 52 | if (c === 0x0B) { return false } |
| 53 | if (c >= 0x0E && c <= 0x1F) { return false } |
| 54 | if (c >= 0x7F && c <= 0x9F) { return false } |
| 55 | // out of range |
| 56 | if (c > 0x10FFFF) { return false } |
| 57 | return true |
| 58 | } |
| 59 | |
| 60 | function fromCodePoint (c) { |
| 61 | /* eslint no-bitwise:0 */ |
no outgoing calls
no test coverage detected
searching dependent graphs…