web-vault v0.0.13
WebVault
Very much an early work in progress.
The privacy focused Data storage solution for PWA's, WebApps, and web sites where user privacy matters.
Supports
- Blockstack
- Dropbox
- CouchDB
- Device Only (localforage)
You must bring your own blockstack/@blockstack/connect, dropbox sdk, and pouchdb. If any are not available, they will not be listed in the getEngines() method.
Basic Usage
let doc = { name: "Brandon", bio: "..." }
await WebVault.write('bios/brandon', doc);
let readDoc = await WebVault.read('bios/brandon')
// returns { name: "Brandon", bio: "..." }
write(path, content, options)
Writing a file with await / async
await WebVault.write('age',44);
await WebVault.write('file/path.json', { any: 'object' });
Writing a file with then/catch
WebVault.write('file/path.json', { some: "data" }).then(res=>{
// Finished Writing
}).catch((e)=>{
// Some error
})
Writing an encrypted file
await WebVault.write('file/path.json', { any: 'object' }, {
encryptionKey: 'my-key-is-a-good-key'
});
read(path,options)
delete(path)
list(path)
deleteAll()
Links
- Open Source Life Tracker Nomie
- Nomie v5 Web App - v5.nomie.app
- Nomie Web App Source - github.com/open-nomie/nomie
- Reddit Community - reddit.com/r/nomie
- Twitter - twitter.com/nomieapp
Trademark License Nomie and the Blue Elephant are registered Trademarks of Happy Data, LLC. Indianapolis, IN. For a commercial use of the brand or logomark please contact support@happydata.org
MIT License Copyright 2019 Happy Data, LLC support@happydata.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.