{"name":"heredoc","version":"1.1.0","description":"multiline strings for javascript","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/jden/heredoc.git"},"keywords":["multiline","string","heredoc","literal"],"author":{"name":"jden","email":"jason@denizac.org"},"license":"AS IS","_id":"heredoc@1.1.0","dist":{"shasum":"b42bb8dea9949cadae06ced81e385680f505e52f","tarball":"http://registry-npm.ywwl.com/heredoc/download/heredoc-1.1.0.tgz","integrity":"sha512-HHzqSCYJC3UBjZmZbW9qFlsAECGFt1lVk5+e8aaKC9kK9IPHrMEPKMp3OML99lxLk/VfitqFH+Yw8e8rrd+JHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBMSdc+ckHFARItmr7OWdX+6x8+hjtW/x3olSfGOWi6AIgYIKcuIIraxKSiScCHBp3uoUID+r68gUTQK8zEKE6c6Y="}],"size":1025,"noattachment":false,"key":"/heredoc/-/heredoc-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.12","_npmUser":{"name":"jden","email":"jason@denizac.org"},"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":1362886956289,"_cnpm_publish_time":1362886956289,"dist-tags":{"latest":"1.3.1"}}