Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

jwoudenberg/homedir-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homedir-config

wercker status NPM version

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!

About

Persistent configuration in a homedir config file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published