3.0.12 • Published 9 months ago
fable-settings v3.0.12
Fable Settings
A very simple, tolerant settings loading library.
Why
It became tiring to see a heap of boilerplate config file/defaults loading at the top of microservices and the like.
How
Install it with npm.
$ npm install fable-settings
Fire it up and access some settings:
var settings = require('fable-settings').new({Product: 'SomeProduct', Version: '9.10.11'});
console.log('My product: '+settings.settings.Product);
console.log('My version: '+settings.settings.Version);
Wanna get tricky? Load settings from JSON:
var settings = require('fable-settings').new({Product: 'SomeProduct', Version: '9.10.11', ConfigFile: '/home/strongbad/config.json'});
Or even merge settings in later:
var settings = require('fable-settings').new({Product: 'SomeProduct', Version: '9.10.11'});
console.log('My product: '+settings.settings.Product);
console.log('My version: '+settings.settings.Version);
settings.merge({FavoriteTool:'Slap Chop'});
console.log('My Favorite Tool: '+settings.settings.FavoriteTool);
Unit Testing
You can run the unit tests by executing:
$ npm test
Or you can get the istanbul coverage report by executing:
$ npm run coverage
3.0.12
9 months ago
3.0.11
9 months ago
3.0.10
1 year ago
3.0.9
2 years ago
3.0.8
2 years ago
3.0.6
2 years ago
3.0.4
2 years ago
3.0.5
2 years ago
3.0.3
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.0.3
6 years ago
1.0.2
7 years ago
1.0.1
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago