Save stuff locally
$ yarn add save-local
const SaveLocal = require('save-local')
const saveLocal = new SaveLocal('store')
// you must call saveLocal.init() to initialize the instance
await saveLocal.init()
saveLocal.set({ name: 'token', value: 'my-token' })
saveLocal.get('token').then(value => console.log(value))
// => my-token
Returns a constructor
Type: string
Required
store name
Returns a promise
Initializes the local store
Returns a promise
Save and encrypt an item on local store
Type: object
Required
Type: string
Required
name of the item to be saved
Type: string
Required
value of the item to be saved
Returns a promise
Get and dencrypt an item saved on local store
Type: string
Required
name of the item saved
Returns a promise
Remove an item saved on local store
Type: string
Required
name of the item saved
Returns a promise
Get an array with all names
and values
- save-me — CLI for this module
- git-labels — Creating Github issue labels
- git-labels-cli — Creating Github issue labels CLI
MIT © Bu Kinoshita