multiline-string
Remove leading space characters to let you nicely indent your multiline strings in your code.
Prerequisite
- Node v4+
Usage
By default, multiline
detects indentation by looking at the first non-empty line.
Notice that the first empty line is dropped from the output to let you to start
the first line with the indentation level you like.
const multiline = const s = console// => "1. xxx\n a. yyy\n2. zzz"
If you want to start your string with an empty line, you can do:
const s = // => "\nLine 1\nLine 2\n"
You can also give marginMark
to identify the start of each line
to include indentation in the resulting text.
const multiline = marginMark: '|' const s = console// => " Usage: ...\n\n -v, --version ..."