(isLegal: (utf16Unit: number) => boolean)
| 125 | } |
| 126 | |
| 127 | export function utf16LegalizeCharacters(isLegal: (utf16Unit: number) => boolean): (s: string) => string { |
| 128 | return utf16ConcatMap(u => (isLegal(u) ? String.fromCharCode(u) : "")); |
| 129 | } |
| 130 | |
| 131 | export function legalizeCharacters(isLegal: (codePoint: number) => boolean): (s: string) => string { |
| 132 | return utf32ConcatMap(u => (u <= 0xffff && isLegal(u) ? String.fromCharCode(u) : "")); |
no test coverage detected
searching dependent graphs…