moon-walk
v1.2.0
Published
Removes trailing indentation at the start of multiple lines
Downloads
14
Readme
MoonWalk.JS
Removes trailing indentation in templating strings and other strings with multiple lines.
Usage
Without moonwalk:
function () {
let y = 0;
if(true) {
let x = `
<div>
<span>OK</span>
<div>
<div></div>
</div>
</div>
`;
}
With moonwalk:
import moonwalk from 'moon-walk';
let y = 0;
if(true) {
let x = moonwalk(`
<div>
<span>OK</span>
<div>
<div></div>
</div>
</div>
`);
}