read-boost-config
v2.0.0
Published
Read boost config file in js
Downloads
3
Readme
read-boost-config
Read boost config file in js
Note: read-boost-config
is only supported on iojs and node v4+. To use with
an older version of node, please use read-boost-config@1
.
Install
$ npm install [--save] [-g] read-boost-config
Test
$ npm test
Coverage
$ npm test -- --cov
API
// parse a string
var str = 'name=evan\n'
console.log(read.parseString(str))
// => { name: 'evan' }
// parse a file
read.parseFileSync('test/fixture')
// => { name: 'evan', foo: 'bar' }
// parse file async
read.parseFile('test/fixture', function(err, data) {
if (err) throw err
console.log(data)
// => { name: 'evan', foo: 'bar' }
})
CLI Tool
$ echo 'name=evan\n' | read-boost-config --json
// => {
// => "name": "evan"
// => }
Author
Evan Lucas
License
MIT (See LICENSE
for more info)