1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-07-18 02:20:12 +02:00
programming-challenges/cli/utils/parseCommandOutput.ts
2022-09-22 16:16:21 +02:00

11 lines
214 B
TypeScript

export const parseCommandOutput = (output: string): string[] => {
return output
.split('\n')
.map((line) => {
return line.trim()
})
.filter((line) => {
return line.length > 0
})
}