1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/cli/utils/parseCommandOutput.ts

11 lines
214 B
TypeScript
Raw Normal View History

2022-09-22 16:16:21 +02:00
export const parseCommandOutput = (output: string): string[] => {
return output
.split("\n")
2022-09-22 16:16:21 +02:00
.map((line) => {
return line.trim()
})
.filter((line) => {
return line.length > 0
})
}