0.2.0 • Published 7 years ago

config-general v0.2.0

Weekly downloads
3
License
BSD-2-Clause
Repository
github
Last release
7 years ago

config-general

A port to NodeJS of the Perl module Config::General

Please note that this code, while hopefully fully functional and bug-free, should be considered a late beta.

Example:

var cg = require('config-general');

var config = cg.parser( { ConfigFile: <filename> } );
var config_data = config.getall();

Yes, it really can be that simple. In fact, if you want to use the defaults for all the options, you can even write the above as:

var config = cg.parser(<filename>);

The data returned from the parsers "getall" method is a standard JavaScript Object masquerading as a hash. You can reference items in that Object as you would items in any other JavaScript object.

For more information about available options and the format of the file itself, please see the documentation of Perl's Config::General and its two sub-modules, Config::General::Extended and Config::General::Interpolated.

I have done a lot of work to make as many features of the Perl module available to users of this NodeJS module. Two features that are missing are the ability to 'tie' to a backing-store (Config::General's '-Tie' parameter) and the functional interface. The "AUTOLOAD methods" feature of Config::General is emulated, to a degree, via the use of ES6 (Harmony) Proxies. To use that feature, you must start your process with either the '--harmony-proxies' or '--harmony' flag.

Please leave information about any missing features or founds bugs on the bug-tracker provided by Github for the project.

0.2.0

7 years ago

0.1.5

9 years ago

0.1.4-a

9 years ago

0.1.4

9 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1-g

10 years ago

0.1.1-f

10 years ago

0.1.1-e

10 years ago

0.1.1-d

10 years ago

0.1.1-c

10 years ago

0.1.1-b

10 years ago

0.1.1-a

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago