1.0.0 • Published 7 years ago

tagged-if v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

tagged-if

Installation

$ npm install tagged-if

Example

// without tagged-if
const example1 = `
  ${
    (() => {
      if (condition) {
        return `then block string`
      } else {
        return `else block string`
      }
    })()
  }
`

// with tagged-if
import { If } from 'tagged-if'
const example2 = `
  ${
    If(condition)`then block string`
    .Else`else block string`
  }
`