arc-config

1.2.0 • Public • Published

arc-config

My own config file format. Object oriented and easy to read.

NPM

Node.js Version Build status Coverage Status License

USAGE

npm install arc-config

let config = require("arc-config").decode(`
# Comments start with a '#'

key value # Keys and values are seperated by spaces

objects are amazing
objects.have properties
objects."are awesome." yes
objects."also have brackets".{
    totally my dude
}
objects.can_also_contain_arrays.[
    totally
    my dude
]
`);

console.log(util.inspect(config));

Output:

{
    'key': 'value',
    'objects': {
        '_root': 'are amazing',
        'have': 'properties',
        'are awesome.': true,
        'also have brackets': {
            'totally': "my dude"
        },
        'can_also_contain_arrays': [
            "totally"
            "my dude"
        ]
    }
}

Readme

Keywords

Package Sidebar

Install

npm i arc-config

Weekly Downloads

0

Version

1.2.0

License

Zlib

Unpacked Size

19 kB

Total Files

8

Last publish

Collaborators

  • aritz-cracker