dedent-tag
v1.0.1
Published
ES2015 tagged template string for removing indent from strings
Maintainers
Readme
Dedent Tag
ES2015 tagged template string for removing indent from strings.
Mirrors on textwrap.dedent, but ignores interpolated values. Why? You can embed dedented strings without breaking indent calculation.
Installation
npm install dedent-tag --saveUsage
import dedent from "dedent-tag";
const text = dedent`
text
with
multiple
lines
`; //=> "\ntext\nwith\nmultiple\nlines\n"
// End first line with `\` to avoid empty line!
const text = dedent`\
more
text
`; //=> "more\ntext\n"License
MIT
