(content: string)
| 23 | * Parses the simple .nam file format which contains one codepoint per line. |
| 24 | */ |
| 25 | const parseNamFile = (content: string): number[] => { |
| 26 | return content |
| 27 | .split('\n') |
| 28 | .map((line) => line.trim()) |
| 29 | .filter((line) => line.startsWith('0x')) |
| 30 | .map((line) => parseInt(line.split(' ')[0] ?? '0', 16)); |
| 31 | }; |
| 32 | |
| 33 | /** |
| 34 | * Parses the text protobuf format for slicing strategies. |
no outgoing calls
no test coverage detected