strip-indent
Strip leading whitespace from each line in a string
redent
Strip redundant indentation and indent the string
ts-dedent
TypeScript package which smartly trims and strips indentation from multi-line strings
min-indent
Get the shortest leading whitespace from lines in a string