You can write to temporary storage or to user-picked files and folders. You can also write to your plugin’s data folder without user mediation.
Use something like this with light weight in memory option.
Hey, I just tried loki.js and it’s not working as persistant storage. Do I need to write to a folder or anything like that?