https://github.com/chatopera/node-readlineq
Read or write file by lines with promise.
https://github.com/chatopera/node-readlineq
Last synced: about 1 month ago
JSON representation
Read or write file by lines with promise.
- Host: GitHub
- URL: https://github.com/chatopera/node-readlineq
- Owner: chatopera
- License: mit
- Created: 2021-10-01T02:48:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T02:57:25.000Z (over 4 years ago)
- Last Synced: 2025-09-08T15:27:31.919Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# readlineq
read or write file by lines with promise.
```
var readlineq = require('readlineq').default;
# read lines with Promise
var lines = await readlineq('./tmp/stopwords.txt');
// console.log(lines);
# write lines which is sync by default
readlineq('./tmp/test.txt', ["foo\n", "bar\n"]);
// console.log(lines);
```
OR ES 6,
```
import readlineq from "readlineq";
# read lines with Promise
var lines = await readlineq('./tmp/stopwords.txt');
// console.log(lines);
# write lines which is sync by default
readlineq('./tmp/test.txt', ["foo\n", "bar\n"]);
// console.log(lines);
```
# LICENSE
MIT
[![chatoper banner][co-banner-image]][co-url]
[co-banner-image]: https://user-images.githubusercontent.com/3538629/135558449-9739c98c-30aa-4b49-916b-87182520c0c6.png
[co-url]: https://www.chatopera.com