Simple storage for workshopper-adventure
Originally included as part of workshopper-adventure, mostly written by Martin Heidegger
npm install workshopper-adventure-storage --save
const createStorage =
A default path to store data in.
Accepts a sequence of paths for
path.resolve to use as the storage directory.
const createStorage =const storage =
The path to store data in.
JSON encodes and writes a file to the storage directory. The following will
save the file as
const data =foo: 'bar'storage
Retrieves and unserializes a file from storage.
var data = storage
Clears the storage directory.