Options
All
  • Public
  • Public/Protected
  • All
Menu

multiline-str

multiline-str

Source Deploy Coverage Status

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.

Generated using TypeDoc