readlineq 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,20 @@
2
2
  read or write file by lines with promise.
3
3
 
4
4
  ```
5
- var readlineq = require('readlineq');
5
+ var readlineq = require('readlineq').default;
6
+ # read lines with Promise
7
+ var lines = await readlineq('./tmp/stopwords.txt');
8
+ // console.log(lines);
9
+
10
+ # write lines which is sync by default
11
+ readlineq('./tmp/test.txt', ["foo\n", "bar\n"]);
12
+ // console.log(lines);
13
+ ```
14
+
15
+ OR ES 6,
16
+
17
+ ```
18
+ import readlineq from "readlineq";
6
19
  # read lines with Promise
7
20
  var lines = await readlineq('./tmp/stopwords.txt');
8
21
  // console.log(lines);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "readlineq",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Read or write file by lines with promise.",
5
5
  "main": "index.js",
6
6
  "type": "module",