DEV Community

Discussion on: Deno v1.10 has added support for localStorage. What do you think would be a good use case for this feature?

Collapse
 
johncarroll profile image
John Carroll • Edited

As one example. A while ago I made a simple discord bot that my friends could interact with. To save state, the bot wrote JSON to a file on my computer. Using localstorage would be a cleaner approach to this same task (especially if I distributed this module to others via something like npm). I expect that there are many uses for this feature. Being able to save data without needing filesystem access is helpful.

Collapse
 
vonheikemen profile image
Heiker • Edited

I haven't created a bot before but I have used JSON files to store data. Avoiding that boilerplate is certainly a win.