UNPKG

shai-analyzer

Version:

A CLI tool to analyze package dependencies and detect breaking changes

7 lines (5 loc) 197 B
export function removeTextBelowKeyword(text: string, keyword: string): string { const index = text.indexOf(keyword); if (index === -1) return text; return text.substring(0, index).trim(); }