{"name":"babel-plugin-dedent","description":"Remove indentation from multiline template strings","version":"2.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.sk"},"license":"MIT","devDependencies":{"chai":"^3.4","@babel/core":"^7.0","@babel/cli":"^7.0","@babel/preset-env":"^7.0","@babel/plugin-transform-instanceof":"^7.0","@babel/plugin-transform-unicode-escapes":"^7.0","jscs":"^1.13","jshint":"^2.8","mocha":"^2.3","shelljs":"^0.5"},"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":"6b0ad4a12ce3802dc17725ba92e162efb9292060","_id":"babel-plugin-dedent@2.1.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-FZ+0BN091iTmyeycxgt6QCVPHEmaWFgtS5KHQvrn4SoM5L1rgBPDXyFCM8VVOaeFuDNptPvBy9ee058I0WAI+g==","shasum":"329f941f51dca986c6c37a720dcb790aa5ce933b","tarball":"http://registry-npm.ywwl.com/babel-plugin-dedent/download/babel-plugin-dedent-2.1.0.tgz","fileCount":4,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgFrmCRA9TVsSAnZWagAAbt8P/1sPHy0rSVcgM1eLs4WH\niK7NhnsmnEN3d3JC9y1CrkuQQ53Ksu+6ZrwAICuDh3YwgKSm0AvC2P+4y1iS\n/QdhJj5odHq3wQebPtL7RB3cRYhElD8YrMLeIMDu2+ufObUnvr+N950ymfm9\nJPhdCpKAhXgRe7Oileq5JFXWgnRXd0sK+2yoIcm+t9E4OH//fiORBq7mmzcS\nNvN9BevfxXIbpIBCxkZwV6EqVK3KgGq4cFYOvmgFXpx1yA+hJbCITcQL6P3Q\n5oany3HF2fdGc3fk/dnDp09/uvGf1EOhaXPzLjkp1oXwmFAebUbnsC7uFj77\nSLeBmuxPDUXQd7AzPTQICQ0kVmV7ylA6uBkhRxREIrz4HIxUGCzIfKGIPwU6\nv5kimRcykRlEs1myBEUQA1H1m+lIr7ef04Deoj4a/wi1pZsrlR+ggSUPxvyZ\nuxAlCpJB5ArjyWJ536niwCJ/vBL+0++ndj/K84hJFFSGJshcowvkEEA1jqdD\n+6weqB5ZRgJDjDYIZZK+Tig1iL8DbN8VDXxp19F0b1jBogPXlSqM0251sQGQ\nN1JqitFMLTqTUEk7WJI2QgBb6Ms5RumSgJfJqAGGsmFVxQoLu8n7aRMvQKDM\nv8f5ZYBmiYBajxFo6TmfQs5GRKtvqaPUzj7atKH4E5NLLEtonnTo1MSFausg\nTJ4b\r\n=tDeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjlPi4IgUrdr02vRLya2dPYAm2QCtLqd/udGtkEpwcnQIgcFFEzI4qCz+v5nNdX9LDucyrRGvvL/Cx1pJkDKO1Ibw="}],"size":2984,"noattachment":false,"key":"/babel-plugin-dedent/-/babel-plugin-dedent-2.1.0.tgz"},"maintainers":[{"name":"martin-kolarik","email":"martin@kolarik.sk"}],"_npmUser":{"name":"martin-kolarik","email":"martin@kolarik.sk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-dedent_2.1.0_1602247398483_0.4611843671996336"},"_hasShrinkwrap":false,"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":1602247398623,"_cnpm_publish_time":1602247398623,"dist-tags":{"latest":"2.1.0"}}