{"name":"json-content-demux","description":"Break up JSON from content in a JSON-first file","version":"0.1.3","homepage":"https://github.com/twolfson/json-content-demux","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/json-content-demux.git"},"bugs":{"url":"https://github.com/twolfson/json-content-demux/issues"},"licenses":[{"type":"MIT","url":"https://github.com/twolfson/json-content-demux/blob/master/LICENSE-MIT"}],"main":"lib/json-content-demux","engines":{"node":">= 0.6.0"},"scripts":{"test":"grunt test"},"devDependencies":{"grunt":"~0.3.12"},"keywords":["json","content","demux","combined","splitter","breaker","break up"],"readme":"# json-content-demux [![Donate on Gittip](http://badgr.co/gittip/twolfson.png)](https://www.gittip.com/twolfson/)\n\nBreak up JSON from content in a JSON-first file\n\n## Getting Started\nInstall the module with: `npm install json-content-demux`\n\n```javascript\n// muxed.md\n{\n  \"title\": \"This is some muxed JSON and content\",\n  \"options\": {\n    \"Hello\": \"World!\"\n  }\n}\n\nHere is some content\nOm nom nom\n\n\n// app.js\nvar jsonContentDemux = require('json-content-demux'),\n    muxedContent = fs.readFileSync('muxed.md', 'utf8'),\n    demuxedObj = jsonContentDemux(muxedStr);\ndemuxedObj.json; // {\"title\":\"This is some muxed...\",\"options\"}\ndemuxedObj.content; // \"Here is some content\\nOm nom nom\"\n```\n\n## Documentation\njsonContentDemux is currently a single function module with a single purpose.\n```js\n/**\n * @param {String} muxStr Muxed content to break up\n * TODO: options is not yet used\n * @param {Object} [options] Options to break up by\n * @param {String|RegExp} [options.delimiter=/\\n\\r?\\n\\r?/] Delimiter between JSON and content\n * @returns {Object} retObj\n * @returns {Object} retObj.json JSON found at the head of the content\n * @returns {String} retObj.content Content found in the body\n */\n```\n\nAt some point, the scope may increasee to encapsulate any markup language as well as multiple sets of delimited items.\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).\n\n## License\nCopyright (c) 2012 Todd Wolfson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"json-content-demux@0.1.3","dist":{"shasum":"5c1277bf7f3b7512a86b732ddd41b32d4dfcb1cc","tarball":"http://registry-npm.ywwl.com/json-content-demux/download/json-content-demux-0.1.3.tgz","integrity":"sha512-RqIm5ECS+BRjOrzapbOVKmQCRZqhv4AD2pav388Zv5umqdbv1qaMmu8yFImHnWRxzzTJnX8i3TsWfqRiT1qRUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNWzMzoYBOysT558FLGuwxkBvmj6o3YXLIaE60nYmkRAiEAnu+MPEtvtLcskZNMtfdxGUkXc14qt6z6m9kg87iwOdI="}],"size":3460,"noattachment":false,"key":"/json-content-demux/-/json-content-demux-0.1.3.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"directories":{},"publish_time":1371619902295,"_cnpm_publish_time":1371619902295,"dist-tags":{"latest":"0.2.0"}}