{"name":"json-content-demux","description":"Break up JSON from content in a JSON-first file","version":"0.1.1","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\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","_id":"json-content-demux@0.1.1","dist":{"shasum":"dab987dfc16e079bae5beaf7ecbc0217556be1fc","tarball":"http://registry-npm.ywwl.com/json-content-demux/download/json-content-demux-0.1.1.tgz","integrity":"sha512-zzK8jgQ1bmugVk4/I6eRbNDCzjSMYr20YRRRiCqTTksxg6jlEZoZECa9tPT0PJKHvMxo6M65JDfpV/buBD9iKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Ci7C3LbxCh+4rusWboHhRhlYMvX/yIsG664NtnG5lgIgEsFzoGyUWRjRm/K4UBWId+iGeGqhG4Y4KzBKVgEXw/M="}],"size":3268,"noattachment":false,"key":"/json-content-demux/-/json-content-demux-0.1.1.tgz"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"directories":{},"publish_time":1353196779462,"_cnpm_publish_time":1353196779462,"dist-tags":{"latest":"0.2.0"}}