{"dist":{"shasum":"bd021c07f2ed7e641a422d1ba3772a459b3b0829","tarball":"https://registry.npmjs.org/to/-/to-0.2.4.tgz","integrity":"sha512-fSYo4+TBfysW8SJLGo3tcexPxDMDtHJ0xnZPGPyU7u2azFZTdrY6Vfouc9fIALHF7ba5R9yMJQsUMYLel9Myaw==","signatures":[{"sig":"MEUCIGv0qUbF4g+2ccDWrztfL+Nv+Hefyu5NQCq6lXkFRhLuAiEAtyrgnhOKA8Rvny4aNPHogMuId6GLbZ4/O7oQQZ8Uwzw=","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 - convert between formats including xml, json, yaml","directories":{},"maintainers":[{"name":"truepattern","email":"admin@truepattern.com"}],"dependencies":{"js-yaml":">= 1.0.2","optimist":">= 0.3.5","htmlparser":">= 1.7.6","underscore":">= 1.4.0"},"devDependencies":{},"_id":"to@0.2.4","version":"0.2.4"}