It would be great if we could write to stdout or a Buffer, for example. This should be very easy, because fs.writeFile already supports writing to these.
Therefore, the only thing that needs to change is the type of path to match the type of the file parameter for fs.writeFile. However, this has changed over time. The readme states the minimum version of node is 4 (in which string is the correct type), but the version of node types is "^14.14.7".
What do you think? If you are amenable to the idea, I can open a pull request.
It would be great if we could write to stdout or a Buffer, for example. This should be very easy, because
fs.writeFile
already supports writing to these.This already works:
Therefore, the only thing that needs to change is the type of
path
to match the type of thefile
parameter forfs.writeFile
. However, this has changed over time. The readme states the minimum version of node is 4 (in whichstring
is the correct type), but the version of node types is"^14.14.7"
.What do you think? If you are amenable to the idea, I can open a pull request.