{"_id":"dedent-js","_rev":"914070","name":"dedent-js","description":"Remove indentation from multiline strings","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.me"}],"time":{"modified":"2021-09-21T11:52:08.000Z","created":"2015-09-19T20:10:34.564Z","1.0.1":"2015-09-19T20:22:27.700Z","1.0.0":"2015-09-19T20:10:34.564Z"},"users":{"sixpetrov":true,"jmiziolek":true,"emj365":true,"d3ck":true},"author":{"name":"Martin Kolárik","email":"martin@kolarik.sk","url":"https://kolarik.me"},"repository":{"type":"git","url":"git+https://github.com/MartinKolarik/dedent-js.git"},"versions":{"1.0.1":{"name":"dedent-js","description":"Remove indentation from multiline strings","version":"1.0.1","homepage":"https://github.com/MartinKolarik/dedent-js/","github":"https://github.com/MartinKolarik/dedent-js/","main":"lib/index.js","keywords":["multiline strings","template literals","template strings","dedent","deintend","indentation","es6","harmony"],"author":{"name":"Martin Kolárik","email":"martin@kolarik.sk","url":"https://kolarik.me"},"license":"MIT","devDependencies":{"chai":"~3.2","babel":"~5.8","mocha":"~2.3","typescript":"~1.6"},"scripts":{"build":"tsc","test":"babel test/tests.es6 --out-file test/tests.js && mocha test"},"repository":{"type":"git","url":"git+https://github.com/MartinKolarik/dedent-js.git"},"bugs":{"url":"https://github.com/MartinKolarik/dedent-js/issues/"},"typescript":{"definition":"./lib/index.d.ts"},"gitHead":"50d64e075b820e18d1e543f1e9f537817c98d735","_id":"dedent-js@1.0.1","_shasum":"bee5fb7c9e727d85dffa24590d10ec1ab1255305","_from":".","_npmVersion":"3.3.4","_nodeVersion":"0.12.7","_npmUser":{"name":"martin-kolarik","email":"martin@kolarik.sk"},"dist":{"shasum":"bee5fb7c9e727d85dffa24590d10ec1ab1255305","size":2908,"noattachment":false,"key":"/dedent-js/-/dedent-js-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dedent-js/download/dedent-js-1.0.1.tgz"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.me"}],"directories":{},"publish_time":1442694147700,"_cnpm_publish_time":1442694147700,"_hasShrinkwrap":false},"1.0.0":{"name":"dedent-js","description":"Remove indentation from multiline strings","version":"1.0.0","homepage":"https://github.com/MartinKolarik/dedent-js/","github":"https://github.com/MartinKolarik/dedent-js/","main":"lib/index.js","keywords":["multiline strings","template literals","template strings","dedent","deintend","indentation","es6","harmony"],"author":{"name":"Martin Kolárik","email":"martin@kolarik.sk","url":"https://kolarik.me"},"license":"MIT","devDependencies":{"chai":"~3.2","babel":"~5.8","mocha":"~2.3","typescript":"~1.6"},"scripts":{"build":"tsc","test":"babel test/tests.es6 --out-file test/tests.js && mocha test"},"repository":{"type":"git","url":"git+https://github.com/MartinKolarik/dedent-js.git"},"bugs":{"url":"https://github.com/MartinKolarik/dedent-js/issues/"},"gitHead":"f31af077f3f497756c277f0064d602a04c8f59c7","_id":"dedent-js@1.0.0","_shasum":"3c34880bd6e62a618dde76d2186271848634899e","_from":".","_npmVersion":"3.3.4","_nodeVersion":"0.12.7","_npmUser":{"name":"martin-kolarik","email":"martin@kolarik.sk"},"dist":{"shasum":"3c34880bd6e62a618dde76d2186271848634899e","size":2848,"noattachment":false,"key":"/dedent-js/-/dedent-js-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dedent-js/download/dedent-js-1.0.0.tgz"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.me"}],"directories":{},"publish_time":1442693434564,"_cnpm_publish_time":1442693434564,"_hasShrinkwrap":false}},"readme":"# dedent-js\n\nRemoves indentation from multiline strings. Works with both tabs and spaces.\n\n## Installation\n\n```\n$ npm install dedent-js\n```\n\n## Usage\n\n```js\n// Dedent can be also used as a function.\nexpect(dedent`Line #1\n\tLine #2\n\tLine #3`).to.equal('Line #1\\nLine #2\\nLine #3');\n\n// Leading/trailing line break is removed.\nexpect(\n\tdedent`\n\tLine #1\n\tLine #2\n\tLine #3\n\t`\n).to.equal('Line #1\\nLine #2\\nLine #3');\n\n// No more than one leading/trailing line break is removed.\nexpect(\n\tdedent`\n\n\tLine #1\n\tLine #2\n\tLine #3\n\n\t`\n).to.equal('\\nLine #1\\nLine #2\\nLine #3\\n');\n\n// Only the \"base\" indentation is removed.\nexpect(\n\tdedent`\n\tLine #1\n\t\tLine #2\n\t\t\tLine #3\n\t`\n).to.equal('Line #1\\n\\tLine #2\\n\\t\\tLine #3');\n\n// The last line is ignored if it doesn't contain anything else than whitespace.\nexpect(\n\tfunction () {\n\t\treturn dedent`\n\t\t\tLine #1\n\t\t\tLine #2\n\t\t\tLine #3\n\t\t`;\n\t}()\n).to.equal('Line #1\\nLine #2\\nLine #3');\n\n// Escaped characters are NOT ignored.\nexpect(\n\tdedent`\n\t\\tLine #1\n\t\\tLine #2\n\t\\tLine #3\n\t`\n).to.equal('Line #1\\nLine #2\\nLine #3');\n```\n\n## License\nCopyright (c) 2015 Martin Kolárik. Released under the MIT license.\n","_attachments":{},"homepage":"https://github.com/MartinKolarik/dedent-js/","bugs":{"url":"https://github.com/MartinKolarik/dedent-js/issues/"},"license":"MIT"}