Files
NeoTachyon/fe-app-podkop/src/helpers/parseValueList.ts
T
ushan0v 1e50faa471 Initial public release of Podkop Plus
publish current Podkop Plus fork state as a single public snapshot

include release installer overhaul with zapret auto-install
2026-04-09 23:24:33 +03:00

10 lines
394 B
TypeScript

export function parseValueList(value: string): string[] {
return value
.split(/\n/) // Split to array by newline separator
.map((line) => line.split('//')[0].split('#')[0]) // Remove comments
.join(' ') // Build clean string
.split(/[,\s]+/) // Split to array by comma and space
.map((s) => s.trim()) // Remove extra spaces
.filter(Boolean); // Leave nonempty items
}