Refactor Text.trimLines method to use arrow function with explicit return

This commit is contained in:
Simon Larsen
2023-12-20 13:30:23 +00:00
parent 3c06af91ba
commit 52f2c8ad14

View File

@@ -19,7 +19,9 @@ export default class Text {
public static trimLines(text: string): string {
return text
.split('\n')
.map((line: string) => line.trim())
.map((line: string) => {
return line.trim();
})
.join('\n');
}