1.2.0 • Published 8 years ago

moon-walk v1.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

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>
    `);
  }