Can I store a file in "memory" with Node.js? Can I store a file in "memory" with Node.js? javascript javascript

Can I store a file in "memory" with Node.js?


It looks like it's possible look at this article how to do it creating writable memory stream


You can use memfs, which is an in-memory filesystem for Node.js.


Because I have not found a single library that suited my needs, I have created diskette. It is a tiny library that tries to efficiently store data such as buffers and strings and make it streamable. I use it in my own projects and so far it works like a charm.

Please let me know if you found a bug or if there's anything more that can be added to it.