# tagged-if

> if statement in template literal

Latest version **1.0.0** (published 2017-07-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tagged-if
pnpm add tagged-if
yarn add tagged-if
bun add tagged-if
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-07-07 |
| First published | 2017-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | isoden |
| Maintainers | isoden |

## Links

- npm: https://www.npmjs.com/package/tagged-if
- Repository: https://github.com/isoden/tagged-if
- Homepage: https://github.com/isoden/tagged-if#readme
- Issues: https://github.com/isoden/tagged-if/issues
- npm.io page: https://npm.io/package/tagged-if

## Recent versions

- 1.0.0 (latest) — 2017-07-07

## README

tagged-if
===

## Installation

```console
$ npm install tagged-if
```

## Example

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

---
_Source: https://npm.io/package/tagged-if · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
