{"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","tarball":"http://registry-npm.ywwl.com/dedent-js/download/dedent-js-1.0.0.tgz","integrity":"sha512-2iy4yUSvqfMph96Aa8Fdpg8EXD9N01HWbeAN6BuE07YbYulWI6KtArmddvezAsfy5zBM7k754thbq0il9PAGkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqVHOCEyjybwTyYH8fbEEulsnhFrk5rjJ6oK/h0+e2xgIhAMznh60PqSip1pqJsIfIoL4PNU0N2mKnb5me9RGksHTr"}],"size":2848,"noattachment":false,"key":"/dedent-js/-/dedent-js-1.0.0.tgz"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.sk"}],"directories":{},"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","publish_time":1442693434564,"_cnpm_publish_time":1442693434564,"dist-tags":{"latest":"1.0.1"}}