* Compare two string keys for binary search. * Uses lexicographic comparison (same as PDF spec).
(a: string, b: string)
| 43 | * Uses lexicographic comparison (same as PDF spec). |
| 44 | */ |
| 45 | function compareKeys(a: string, b: string): number { |
| 46 | if (a < b) { |
| 47 | return -1; |
| 48 | } |
| 49 | |
| 50 | if (a > b) { |
| 51 | return 1; |
| 52 | } |
| 53 | |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * PDF Name Tree reader. |
no outgoing calls
no test coverage detected