{"name":"babel-plugin-dedent","description":"Remove indentation from multiline template strings","version":"1.1.0","homepage":"https://github.com/MartinKolarik/babel-plugin-dedent/","github":"https://github.com/MartinKolarik/babel-plugin-dedent/","main":"lib/index.js","keywords":["template literals","template strings","dedent","deintend","indentation","es6","harmony","babel"],"author":{"name":"Martin Kolárik","email":"martin@kolarik.sk","url":"https://kolarik.me"},"license":"MIT","devDependencies":{"chai":"2.3.0","babel":"5.2.6","jscs":"1.13.1","jshint":"2.7.0","mocha":"2.2.4","shelljs":"0.4.0"},"scripts":{"build":"node bin/build.js","lint":"jscs src && jshint src","test":"npm run lint && node bin/test.js"},"repository":{"type":"git","url":"git+https://github.com/MartinKolarik/babel-plugin-dedent.git"},"bugs":{"url":"https://github.com/MartinKolarik/babel-plugin-dedent/issues/"},"gitHead":"b20c6873f22bc65f2ffec7da332c63a2f4380c5f","_id":"babel-plugin-dedent@1.1.0","_shasum":"5183935ea32f0730eba2cf5a6e72cb4db605f72f","_from":".","_npmVersion":"2.8.0","_nodeVersion":"0.12.0","_npmUser":{"name":"martin-kolarik","email":"martin@kolarik.me"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.me"}],"dist":{"shasum":"5183935ea32f0730eba2cf5a6e72cb4db605f72f","tarball":"http://registry-npm.ywwl.com/babel-plugin-dedent/download/babel-plugin-dedent-1.1.0.tgz","integrity":"sha512-ED4DOPtIhdIDkF/RfKHwaENWw5MAbTaBDxj6wvceKfvchLBgRy3D+9nwCezzx9vvHuNy0bzpiEkuVojQVStzFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBu6fMSJifYo9FBF/T+p1sar1zwYvqJJNglrBdt3veI8AiEAuR6ToQeRLyKZHcxSfvsht5YB2wyhTqLIeZNRfPr90C4="}],"size":2512,"noattachment":false,"key":"/babel-plugin-dedent/-/babel-plugin-dedent-1.1.0.tgz"},"directories":{},"readme":"# babel-plugin-dedent\n\nRemoves indentation from multiline template strings. Works with both tabs and spaces.\n\nNot using Babel? [Here's a runtime version of this plugin.](https://github.com/MartinKolarik/dedent-js)\n\n## Installation\n\n```\n$ npm install babel babel-plugin-dedent\n$ babel --plugins dedent script.js\n```\n\n### Babel v6+\n\nv2.x.x of this plugin is required. Older versions are not compatible with Babel v6+.\n\n## Usage\n\nIndentation will be removed from all strings tagged with `dedent` tag (you can also use `dedent` as a function, if you need to use your own tag).\n\n```js\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 ignored.\nexpect(\n\tdedent`\n\t\\tLine #1\n\t\\tLine #2\n\t\\tLine #3\n\t`\n).to.equal('\\tLine #1\\n\\tLine #2\\n\\tLine #3');\n```\n\n## License\nCopyright (c) 2015 - 2020 Martin Kolárik. Released under the MIT license.\n","publish_time":1430926075204,"_cnpm_publish_time":1430926075204,"dist-tags":{"latest":"2.1.0"}}