mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-12-08 00:45:29 +01:00
64d71d6920
fixes #12
11 lines
214 B
TypeScript
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
|
|
})
|
|
}
|