# @nitra/tf

> Vite translate helper

Latest version **1.3.1** (published 2024-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nitra/tf
pnpm add @nitra/tf
yarn add @nitra/tf
bun add @nitra/tf
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2024-05-15 |
| First published | 2022-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | vitaliytv |
| Keywords | nitra, translate |

## Links

- npm: https://www.npmjs.com/package/@nitra/tf
- Repository: https://github.com/nitra/tf
- Issues: https://github.com/nitra/tf/issues
- npm.io page: https://npm.io/package/@nitra/tf

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.3.1 (latest) — 2024-05-15
- 1.3.0 — 2024-01-13
- 1.2.4 — 2024-01-07
- 1.2.3 — 2023-06-20
- 1.2.2 — 2023-06-19
- 1.2.1 — 2023-06-19
- 1.2.0 — 2023-05-23
- 1.1.1 — 2022-11-18
- 1.1.0 — 2022-11-05
- 1.0.0 — 2022-10-23

## README

# @nitra/tf

usage with Vite (set `import.meta.env.VITE_T` to activate translation):

```javascript
import tf from '@nitra/tf'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

```

usage node (set `process.env.VITE_T` to activate translation):

```javascript
import tf from '@nitra/tf'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

```

usage webpack (set `process.env.VITE_T` to activate translation):

```javascript
import tf from '@nitra/tf/webpack'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

```

usage without environment variable:

```javascript
import tf from '@nitra/tf/t'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr, t: 1 })

t`Привіт` // Hello

```

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