TOML support for JSTransformers.
npm install jstransformer-toml
var toml = require('jstransformer')(require('jstransformer-toml'));
var opts = {};
var result = toml.render('[toml]\nbar = "baz"\nqux = true', opts);
console.log(JSON.parse(result).body)
//=> '{"toml": {"bar": "baz", "qux": true}}'
var promise = toml.renderFileAsync('./path/to/config.toml', opts);
promise.then(function(data) {
console.log(JSON.parse(result).body);
//=> '{"toml": {"bar": "baz", "qux": true}}'
});
MIT