{"name":"heredoc","version":"1.3.1","description":"multiline strings for javascript","main":"index.js","scripts":{"test":"standard && mocha","test-browser":"echo open http://localhost:5000/test/runner.html && oceanify serve"},"repository":{"type":"git","url":"git://github.com/jden/heredoc.git"},"keywords":["multiline","string","heredoc","literal"],"author":{"name":"jden","email":"jason@denizac.org"},"contributors":[{"name":"jden","email":"jason@denizac.org"},{"name":"Jake Chen","email":"jakeplus@gmail.com"}],"license":"ISC","devDependencies":{"mocha":"~2.2.5","oceanifier":"~3.0.1","opener":"^1.4.1","should":"~6.0.3","standard":"^4.0.1"},"gitHead":"f6fc5340c4362167ded8aea51c9525153006ec82","bugs":{"url":"https://github.com/jden/heredoc/issues"},"homepage":"https://github.com/jden/heredoc","_id":"heredoc@1.3.1","_shasum":"2b0de9b80aca3fd0c6937b0e8f9efd6150e0dbd7","_from":".","_npmVersion":"2.7.0","_nodeVersion":"0.10.36","_npmUser":{"name":"jden","email":"jason@denizac.org"},"dist":{"shasum":"2b0de9b80aca3fd0c6937b0e8f9efd6150e0dbd7","tarball":"http://registry-npm.ywwl.com/heredoc/download/heredoc-1.3.1.tgz","integrity":"sha512-VL/rh/EXkhgpIWSNNde3OPc067oQiorfY+Nhkwgo2jAAIgrLLb5N92wmOblTyMWwCcIKo+8aQzk5s5YxLbVJPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDJdhlX3hP5zw1p4DcTW6PdTzKxGFBZjwu2B+MOi2/XeAiEA7up1TynXzjyIituQITuC9YelW/0pwBXJRNIiqEqiY7g="}],"size":2777,"noattachment":false,"key":"/heredoc/-/heredoc-1.3.1.tgz"},"maintainers":[{"name":"jden","email":"jason@denizac.org"}],"directories":{},"readme":"# heredoc\nmultiline strings for javascript\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) [![Circle CI](https://circleci.com/gh/jden/heredoc.svg?style=svg)](https://circleci.com/gh/jden/heredoc) \n\n\n## usage\n\nthis technique takes advantage of `Function.prototype.toString()`\n\n```js\n    var heredoc = require('heredoc')\n    var str = heredoc(function () {/*\n    within this comment block,\n    any text\n    will\n      be\n        treated\n          as\n      pre-formatted\n        multiline text\n    (kinda like html <pre>)\n    */})\n    console.log(str)\n```\n\nYou can also strip leading indentation:\n\n```js\nvar text = heredoc.strip(function() {/*\n      <body>\n        <p>indented strings are fine.</p>\n        <p>the preceding spaces will be shrinked.</p>\n      </body>\n    */})\n```\n\nwill result in:\n\n```\n<body>\n  <p>indented strings are fine.</p>\n  <p>the preceding spaces will be shrinked.</p>\n</body>\n\n```\n\n## AMD\n\n`heredoc` defines itself as an AMD module for use in AMD environments.\n\n## installation\n\n    $ npm install heredoc\n\n## testing\n\nInstall all dependencies:\n\n```bash\n$ npm install\n$ npm test        # run tests in node\n$ npm run test-browser       # start a server to run tests in browser\n$ open http://localhost:5000/test/runner.html\n```\n\n## contributors\n\n  - jden <jason@denizac.org>\n  - Jason Kuhrt <jasonkuhrt@me.com>\n  - Guy Bedford <guybedford@gmail.com>\n  - Jake Chen <jakeplus@gmail.com>\n\n## kudos\n\nthanks to @izs - I first saw this technique when reading through npm source. I find it to be much neater than lots of manual string concatenation.\n\n## license\nISC\n","publish_time":1433906914129,"_cnpm_publish_time":1433906914129,"dist-tags":{"latest":"1.3.1"}}