1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-10-29 22:17:23 +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
})
}