homedir-config

0.1.1 • Public • Published

homedir-config

wercker status NPMversion

Persistent configuration in a homedir config file.

Install it from npm.

npm install homedir-config

Usage

The code below will create a new HomedirConfig instance, that saves and loads its configuration from ~/my-config.json:

var HomedirConfig = require('homedir-config');
var config = new HomedirConfig('my-config');

Now you can get and set keys from the configuration file:

config.set('foo', 'bar');
var result = config.get('foo');
console.log(result);  //-> 'bar'

That's it!

Readme

Keywords

none

Package Sidebar

Install

npm i homedir-config

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jasperwoudenberg