1.0.0 • Published 4 years ago

@liteflow/vault v1.0.0

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

@liteflow/vault

Store securely your information

Installation

npm install @liteflow/vault

Usage

const Vault = require('@liteflow/vault')
const MemoryStore = require('@liteflow/vault/lib/store/memory')
const encryptedStore = new MemoryStore()
const vault = new Vault(encryptedStore)

vault.set('my-key', { foo: 'bar' }, 'my-password')
const data = vault.get('my-key', 'my-password')

Store

@liteflow/vault can use different stores to store your data.

Memory store

This store will not persist any data and keep everything in a map in memory.

const MemoryStore = require('@liteflow/vault/lib/store/memory')
new Vault(new MemoryStore())

File store

This store will persist the values in a json file on disk (only available in node).

const FileStore = require('@liteflow/vault/lib/store/file')
new Vault(new FileStore('./store.json'))

Localstorage

This store is only available on browser and will persist on the localstorage of your browser.

const LocalStorageStore = require('@liteflow/vault/lib/store/file')
new Vault(new LocalStorageStore())
1.0.0

4 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.2

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago