{"bugs":{"url":"http://github.com/pvorb/node-props/issues"},"dist":{"shasum":"98ba67065fb4a6e352538ed40a73070fddabd0f6","tarball":"https://registry.npmjs.org/props/-/props-0.3.0.tgz","integrity":"sha512-fIvqksxTBNejdUj/iwDmdUySlfonDzuflfQQXz0BxA3yL0R2Qd9u6jTuXq9Y+tIaSUHT8Y7u2AxPYxzrry8FRA==","signatures":[{"sig":"MEYCIQDfuDuIynMCMGZnmLQ0ktxIPL90x8J6+vW+ra9PTH21sAIhAOZXrv1G1UzbRCVs3Cf5zHFGm8fF5KgjP7YT2cekrB34","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./props.js","name":"props","tags":["parser","properties","json","yaml","jsml"],"author":{"url":"http://vorb.de","name":"Paul Vorbach","email":"paul@vorb.de"},"readme":"# props\n\na module for node that is able to extract either JSON or YAML from the beginning\nof a string\n\n## Installation\n\n`npm install props` or `npm install -g props`\n\n## Usage\n\n```js\nvar props = require(\"props\");\n\n// Use JSON\n\nvar json =\n'{\\n\\\n  \"title\": \"How to use node.js\",\\n\\\n  \"date\": \"2011-08-09T17:56:00\",\\n\\\n  \"tags\": [ \"example\", \"node.js\" ]\\n\\\n}\\n\\\n\\n\\\n\\n\\\nNode.js is a new technology...';\n\nconsole.log(props(json));\n\n// or YAML\n\nvar yaml =\n'title: How to use node.js\\n\\\ndate: 2011-08-09T17:56:00\\n\\\ntags:\\n\\\n  - example\\n\\\n  - node.js\\n\\\n\\n\\\n\\n\\\nNode.js is a new technology...';\n\nconsole.log(props(yaml));\n```\n\nThis will print nearly the same object twice, since `json` and `yaml` define the\nsame object:\n\n_JSON_:\n\n```js\n{ title: 'How to use node.js',\n  date: '2011-08-09T17:56:00',\n  tags: [ 'example', 'node.js' ],\n  __content: 'Node.js is a new technology...' }\n\n```\n\n_YAML_:\n\n```js\n{ title: 'How to use node.js',\n  date: Tue, 09 Aug 2011 15:56:00 GMT,\n  tags: [ 'example', 'node.js' ],\n  __content: 'Node.js is a new technology...' }\n```\n\nThe difference is that, due to it's JS implementation, the Date is parsed in the\nYAML version.\n\nThe JSON/YAML part has to be **always** seperated from the content by three\nnewline characters (`\\n\\n\\n` or `\\r\\n\\r\\n\\r\\n`).\n\n## Bugs and Issues\n\nIf you encounter any bugs or issues, feel free to open an issue at\n[github](//github.com/pvorb/node-props/issues).\n\n## License\n\nThe [MIT license](http://vorb.de/license/mit.html).\n","engines":{"node":"*"},"repository":{"url":"git://github.com/pvorb/node-props.git","type":"git"},"description":"extract json/yaml from the beginning of text files","maintainers":[{"name":"pvorb","email":"paul@vorb.de"}],"dependencies":{"jsml":"<0.1.0","js-yaml":">=0.3.5 <1.1.0"},"devDependencies":{},"optionalDependencies":{},"_id":"props@0.3.0","version":"0.3.0"}