(ps: Piece[])
| 3 | |
| 4 | const balancedFences = (s: string) => (s.match(/```/g)?.length ?? 0) % 2 === 0; |
| 5 | const totalConsumed = (ps: Piece[]) => ps.reduce((n, p) => n + p.consumed, 0); |
| 6 | |
| 7 | describe('splitForStream', () => { |
| 8 | it('keeps short text in a single piece, consuming all of it', () => { |