| 467 | // what a statement declares, as `export const User`, or what it imports from |
| 468 | const headOf = |
| 469 | ({ texts }: ModuleTokens) => |
| 470 | ([start, end]: StatementTokens): string => { |
| 471 | if (texts[start] === "import") { |
| 472 | const from = texts[end - 1] === ";" ? end - 2 : end - 1 |
| 473 | return `import\0${texts[from]}` |
| 474 | } |
| 475 | let last = start |
| 476 | while (last < end && last < start + 6 && !opensValue.test(texts[last])) |
| 477 | last++ |
| 478 | return texts.slice(start, last).join("\0") |
| 479 | } |
| 480 | |
| 481 | const diffOf = ( |
| 482 | base: string[], |