15 lines
296 B
TypeScript
15 lines
296 B
TypeScript
import { readFileSync } from 'fs';
|
|
import { join } from 'path';
|
|
|
|
const fileString = readFileSync(join(__dirname, "input"), 'utf-8');
|
|
var rows = fileString.split("\n");
|
|
|
|
rows = rows.map(val => {
|
|
return val.trim();
|
|
});
|
|
rows = rows.filter(val => {
|
|
return val.length > 0;
|
|
});
|
|
|
|
console.log(rows);
|