{"name":"heredoc","version":"1.2.0","description":"multiline strings for javascript","main":"index.js","scripts":{"test":"node node_modules/mocha/bin/mocha"},"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":"Jason Kuhrt","email":"jasonkuhrt@me.com"},{"name":"Guy Bedford","email":"guybedford@gmail.com"},{"name":"Jake Chen","email":"jakeplus@gmail.com"}],"license":"AS IS","devDependencies":{"mocha":"~1.12.0","chai":"~1.7.2"},"bugs":{"url":"https://github.com/jden/heredoc/issues"},"_id":"heredoc@1.2.0","dist":{"shasum":"0f5f44c8f844e738ff3b9eacd7c3384d5bfad63c","tarball":"http://registry-npm.ywwl.com/heredoc/download/heredoc-1.2.0.tgz","integrity":"sha512-77qFjkoe2JYhyvzXc9T1GIGX6REu3hUWP7j1Kse2xa+wl57p+I3vrnE3WEsycooulgoTkPmMh3P/LXVU0aQRxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7B265RgZbvDivrLdxERSTy2SOjO9it0e7gganp19OPwIhAONP9r+XzQHzzKeVHjvAlycAbE+GYWZoxPlQHIzy6OtL"}],"size":1938,"noattachment":false,"key":"/heredoc/-/heredoc-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.2","_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":1375126322512,"_cnpm_publish_time":1375126322512,"dist-tags":{"latest":"1.3.1"}}