{"dist":{"shasum":"8d64423ed54db955eca842e8a3fddc9b13585340","tarball":"https://registry.npmjs.org/to/-/to-0.2.2.tgz","integrity":"sha512-G2BBHLdV7e2luLazqeitg5vevKTCYEq1I8gj3if9ALQmSyAP3xLDW3FlRXkq5GnNLrGhBPdKPfVakt43y14u/Q==","signatures":[{"sig":"MEYCIQC84MJm4JEZnw44ruC+UPAlLUFV0i4Qg/cJBDwwq0G5qAIhAOo0bOii+828zAVHofalLDrEpPe098lFdhRaX2a/bdOj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","name":"to","author":{"name":"truepattern","email":"admin@truepattern.com"},"readme":"# 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  * handling different input/output formats: yaml,json,xml\n  * only input xml is handled (no output xml yet)\n\n## Installation\n    $ npm install -g to\n    $ npm install to\n\n## Usage\nWithin program\n```js\nvar to = require('to');\n\n# Load yaml\nvar yamldoc = to.format.yaml.load('config.yaml');\n\n# print doc in yaml \nvar doc = ...;\nconsole.log(to.format.yaml.stringify(doc));\n\n```\n\n * refer to examples directory for xml, json, yaml code\n\n## Output\nFor a sample xml\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">\n\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```\n\nOutput json\n```json\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\nOutput YAML\n```yaml\ndummy:\n  value: ['15', '35', '5', '4784', 'one more']\n  h: [decent, list, another]\n  object: value\n  inner: { h1: value, li: [got, milk] }\n```\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","engines":{"node":">= 0.5.0"},"scripts":{"prepublish":"npm prune"},"homepage":"https://github.com/truepattern/to","keywords":["converter","convertor","json","xml","yaml"],"repository":{"url":"git://github.com/truepattern/to","type":"git"},"description":"to - convertors to popular formats","directories":{},"maintainers":[{"name":"truepattern","email":"admin@truepattern.com"}],"dependencies":{"yamljs":">= 0.1.2","commander":">= 1.0.4","htmlparser":">= 1.7.6","underscore":">= 1.4.0"},"devDependencies":{},"_id":"to@0.2.2","version":"0.2.2"}