1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-11-09 22:08:58 +01:00
programming-challenges/cli/utils/parseCommandOutput.ts

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
})
}