Skip to content

Commit 7017d56

Browse files
Update README.md (#506)
`Buffer()` is deprecated due to security and usability issues
1 parent dcf6de0 commit 7017d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ You need to convert the result of `db.export` to a buffer
194194
const fs = require("fs");
195195
// [...] (create the database)
196196
const data = db.export();
197-
const buffer = new Buffer(data);
197+
const buffer = Buffer.from(data);
198198
fs.writeFileSync("filename.sqlite", buffer);
199199
```
200200

0 commit comments

Comments
 (0)