multiline-str
v1.0.4
Published
Convenient multiline strings for JavaScript
Downloads
74
Readme
multiline-str
Strip indentation of multiline strings based on length of the last line.
Installation
Node
npm i panic-fn
Deno
import { m } from "https://deno.land/x/multiline_str/mod.ts";
Usage
import { m } from "multiline-str";
console.log(m`
Indentation is magically removed.
No more whitespace junk before text.
`);
console.log(m`
You control indentation with the length of the last line
this ---> `);
console.log(m`
|Important stuff
everything else |more important stuff
will be removed |the most important stuff
|`);
console.log(m`
001 | You can even
002 | do some
003 | weird things
*** | `);
Module info
This module was created using denoland/dnt.
This project is Mit Licensed.