node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

jstransformer-toml

jstransforer-toml

TOML support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-toml

API

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}}' 
});

License

MIT