{"dist":{"shasum":"0ba5a56fe53538db9205ceb6d7ed217aae4635c4","tarball":"https://registry.npmjs.org/to/-/to-0.2.9.tgz","integrity":"sha512-Xb5kmQVcuba43Ac3fCXVcF8bthDGdg0jeUoyQpyOhVDr3D9sKkLRp7fgkP32eh4lSHY3XzfuhFstU2wLyNGk2g==","signatures":[{"sig":"MEYCIQCkVNgy/xq6FFh1k8Qkt64gSDBR21oD3HgPQLAJ4P45mQIhAL6KvY13gnmVIMvPYxPzv4EjWGEPsmJb+DMVicTo31sU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","name":"to","author":{"name":"el aras","email":"openmason@gmail.com"},"readme":"[![build status](https://secure.travis-ci.org/openmason/to.png)](http://travis-ci.org/openmason/to)\n\n# to.js\ncollection of convertors.\nComes with command line options to use the convertors along with a library version that can be used within programs as well.\n\n# Solves\n  * read input formats json, xml, yaml \n  * converts the document to internal javascript object form\n  * write output as json, yaml documents\n  * only input xml is handled (no output xml yet)\n\n## Installation\n\n    $ npm install -g to\n    $ npm install to\n\n## Usage\n\nCommand line:\n\n     # reads xml file and prints it in yml\n     $ to -i examples/sample.xml -o .yaml\n     \n     # reads yaml and prints it in json\n     $ to -i examples/sample.yml -o .json\n\nWithin your program:\n\n    var to = require('to');\n    \n    # Load yaml\n    var yamldoc = to.format.yaml.load('config.yaml');\n    \n    # print doc in yaml \n    var doc = ...;\n    console.log(to.format.yaml.stringify(doc));\n\n * refer to examples directory for xml, json, yaml code\n\n## Example\nFor a sample input xml:\n\n    <?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n    <!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">    \n    <dummy>\n    <value>15</value>\n    <value>35</value>\n    <value>5</value>\n    <value>4784</value>\n    <value>one more</value>\n    <h>decent</h>\n    <h>list</h>\n    <h>another</h>\n    <object>value</object>\n    <inner>\n      <h1>value</h1>\n      <li>got</li>\n      <li>milk</li>\n    </inner>\n   </dummy>\n\nOutput in json:\n\n    {\n      \"dummy\": {\n        \"value\": [\n          \"15\",\n          \"35\",\n          \"5\",\n          \"4784\",\n          \"one more\"\n        ],\n        \"h\": [\n          \"decent\",\n          \"list\",\n          \"another\"\n        ],\n        \"object\": \"value\",\n        \"inner\": {\n          \"h1\": \"value\",\n          \"li\": [\n            \"got\",\n            \"milk\"\n          ]\n        }\n      }\n    }\n    \n    # to try this example\n    $ to -i examples/sample1.xml -o .json\n\nOutput in yaml:\n\n    dummy: \n      value: \n        - 15\n        - 35\n        - 5\n        - 4784\n        - \"one more\"\n      h: \n        - decent\n        - list\n        - another\n      object: value\n      inner: \n        h1: value\n        li: \n          - got\n          - milk\n\n    # to try this example\n    $ to -i examples/sample1.xml -o .yaml\n\n## Todo\n * Input html (be forgiving with bad html)\n * Input markdown \n * Output xml\n * Output html\n * add unit tests\n * allow beautification params for all outputs \n\n## Test cases\nTo execute full test cases\n\n    $ make\n\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"make test","prepublish":"npm prune"},"homepage":"https://github.com/openmason/to","keywords":["converter","convertor","json","xml","yaml"],"repository":{"url":"git://github.com/openmason/to","type":"git"},"description":"load/convert between xml,json,yaml formats","directories":{},"maintainers":[{"name":"truepattern","email":"admin@truepattern.com"},{"name":"openmason","email":"openmason@gmail.com"}],"dependencies":{"handy":">= 0.0.11","js-yaml":">= 1.0.2","optimist":">= 0.3.5","htmlparser":">= 1.7.6","underscore":">= 1.4.0"},"devDependencies":{"mocha":">= 1.6.0","should":">= 1.2.0"},"_id":"to@0.2.9","version":"0.2.9"}