Skip to content

Commit ffd2a2d

Browse files
committed
Updated snippet as it looked dated
1 parent 27add6b commit ffd2a2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ You can keep writing records into the same file by calling `writeRecords` multip
4646
(but need to wait for the fulfillment of the `promise` of the previous `writeRecords` call).
4747

4848
```js
49-
Promise.resolve()
50-
.then(() => csvWriter.writeRecords(records1))
51-
.then(() => csvWriter.writeRecords(records2))
52-
...
49+
// In an `async` function
50+
await csvWriter.writeRecords(records1)
51+
await csvWriter.writeRecords(records2)
52+
...
5353
```
5454

5555
However, if you need to keep writing large data to a certain file, you would want to create

0 commit comments

Comments
 (0)