1.1.0 • Published 9 years ago

minivault-core v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Minivault (Core)

npm Dependencies Build Status Coverage Status JavaScript Standard Style

A pretty rudimentary vault. Keeps a key-value store under ~/.minivault, encrypted with a password.

This package provides the core API. You may also be interested in the Web front end and the RESTful API.

Usage

var Minivault = require('minivault-core')

var vault = new Minivault({secret: 'myMasterPassword'})

vault.get('someKey')
  .then(function (data) {
    console.info('Data for someKey:', data)
  })
  .catch(function (err) {
    console.error(err)
  })

vault.put('someOtherKey', data)
  .then(function () {
    console.info('Data stored')
  })
  .catch(function (err) {
    console.error(err)
  })

vault.delete('uselessKey')
  .then(function () {
    console.info('Key deleted')
  })
  .catch(function (err) {
    console.error(err)
  })

vault.index()
  .then(function (keys) {
    console.info('Keys in vault:', keys)
  })
  .catch(function (err) {
    console.error(err)
  })

A synchronous API is also available. The corresponding functions are getSync, putSync, deleteSync, and indexSync.

Author

Tim De Pauw

License

MIT

1.1.0

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago