https://github.com/tradle/offline-keeper
very basic promise-based key-value store
https://github.com/tradle/offline-keeper
Last synced: 2 months ago
JSON representation
very basic promise-based key-value store
- Host: GitHub
- URL: https://github.com/tradle/offline-keeper
- Owner: tradle
- License: mit
- Created: 2015-09-30T19:24:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-01T02:49:38.000Z (over 10 years ago)
- Last Synced: 2024-04-24T17:42:29.318Z (about 2 years ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# offline-keeper
[](https://nodei.co/npm/offline-keeper/)
# Usage
See tests, the API is very basic
## putOne(String, Buffer)
Returns a Q.Promise that resolves when the value is written to disk
## getOne(String)
Returns a Q.Promise that resolves to a Buffer
## removeOne(String)
Returns a Q.Promise that resolves when the corresponding value is erased from the disk
## getMany([String, ...])
Returns a Q.Promise that resolves to an array with values (Buffer) and/or nulls, depending on if values exist on disk or not
## clear
Deletes all stored values
## close
Finish pending writes and die