Package Exports
- to
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
to.js
collection of convertors. Comes with command line options to use the convertors along with a library version that can be used within programs as well.
Solves
- handling different input/output formats: yaml,json,xml
- only input xml is handled (not output xml yet)
Installation
$ npm install -g to
$ npm install to
Usage
Within program
var to = require('to');
# Load yaml
var yamldoc = to.format.yaml.load('config.yaml');
# print doc in yaml
var doc = ...;
console.log(to.format.yaml.stringify(doc));
- refer to examples directory for xml, json, yaml code
Todo
- Input html (be forgiving with bad html)
- Input markdown
- Output xml
- Output html
- add unit tests
- allow beautification params for all outputs