Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 18:14:33 +02:00
parent 52487bd328
commit 9acb7dadc1
3 changed files with 6 additions and 4 deletions

View File

@ -8,8 +8,8 @@ lastUpdated: 2020-10-22T20:24:04+03:00
Returns an array of lines from the specified file.
- Use `fs.readFileSync()` to create a `Buffer` from a file.
- Convert buffer to string using `Buffer.toString(encoding)` function.
- Use `String.prototype.split('\n')` to create an array of lines from the contents of the file.
- Use `Buffer.prototype.toString()` to covert the buffer to a string.
- Use `String.prototype.split()` to create an array of lines from the contents of the file.
```js
const fs = require('fs');