A store is an olojs document container. It implements the Store interface, which can be summarized as follows:
store.read(path)
returns the source of the document mapped to the given pathstore.write(path, source)
modifies the source of the document mapped to the given pathstore.delete(path)
removes the document mapped to the given path
olojs comes with the following pre-defined stores:
- MemoryStore which holds documents stored in memory
- FileStore which holds documents stored as files (NodeJS only)
- BrowserStore which holds documents stored in the browser storage (Browser only)
- HTTPStore which interfaces with a remote store served via HTTP (see also HTTPServer)
- Router which bounds together multiple stores while behaving like a single store
- HyperStore which bounds together multiple stores, each mapped to a different URI scheme
- SubStore which is to a store what a sub-directory is to a root directory
More stores can be created by extending the Store class.