commentless-tag

1.0.3 • Public • Published

commentless-tag

Removes commented lines before passing it on to another template tag.

Only lines commented with // are removed.

Example:

import commentless from 'commentless-tag'
import {identityTag as identity} from 'identity-tag'

const output = commentless(identity)`
  <div>
    // <span></span>
    <span></span>
    // <button prop=${'1'} class="button"> 
    //   Back 
    // </button>
    <button prop=${'2'} class="button"> 
      Back 
    </button>
  </div>
`

console.log('output', output)
/* prints:
output 
  <div>
    
    <span></span>
    
    
    
    <button prop=2 class="button"> 
      Back 
    </button>
  </div>
* */

Package Sidebar

Install

npm i commentless-tag

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.08 kB

Total Files

4

Last publish

Collaborators

  • yatchee