UNPKG

363 BJavaScriptView Raw
1const { read } = require('..');
2
3(async () => {
4 const res = await read(__filename)
5 console.log(res)
6 const buffer = await read(__filename, { binary: true })
7 console.log(buffer) // <Buffer 63 6f 6e 73 74 20 7b 20 72 65 61 64 20 7d 20 3d 20 72 65 71 75 69 72 65 28 27 2e 2e 27 29 3b 0a 0a28 61 73 79 6e 63 20 28 29 20 3d 3e 20 7b 0a 20 20 ... >
8})()