btimby / ug

Web Underground browser-based website hosting platform.
MIT License
4 stars 0 forks source link

Extract PrefixedStorage to external package. #20

Open btimby opened 3 years ago

btimby commented 3 years ago

Create a new npm package that encapsulates the PrefixedStorage class as well as the node / browser compatibility here. This could be a good standalone library and is not specific to this project.

https://github.com/btimby/ug/blob/master/src/engine/storage.js

Node / browser compatibility is achieved by using dom-storage under node, which is a localStorage-like interface that saves to a json file.

https://github.com/btimby/ug/blob/master/src/index.js#L419