npm.io
1.0.0 • Published 9 years ago

tagged-if

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

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