(text)
| 1 | 'use strict'; |
| 2 | |
| 3 | function parseHandoff(text) { |
| 4 | const match = text.match(/---\s*HANDOFF\s*---\s*\n([\s\S]*?)(?:\n---|\Z)/i); |
| 5 | if (!match) { |
| 6 | return { found: false, items: [], raw: '' }; |
| 7 | } |
| 8 | |
| 9 | const raw = match[1].trim(); |
| 10 | const items = raw.split('\n') |
| 11 | .map(line => line.replace(/^[-*]\s*/, '').trim()) |
| 12 | .filter(Boolean); |
| 13 | |
| 14 | return { found: true, items, raw }; |
| 15 | } |
| 16 | |
| 17 | module.exports = { |
| 18 | parseHandoff, |
no outgoing calls
no test coverage detected