# invert-text

> A simple tool to generate inverted/upside-down/australiaized/upended/upturned text

Latest version **0.2.1** (published 2022-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install invert-text
pnpm add invert-text
yarn add invert-text
bun add invert-text
```

Provides the command `invert-text`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-08-25 |
| First published | 2021-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Siddartha Adusumalli |
| Maintainers | sid2u |
| Keywords | inverted, text, upended, upturned, upside-down, localization, l10n |

## Links

- npm: https://www.npmjs.com/package/invert-text
- Repository: https://github.com/sid2u/invert-text
- Homepage: https://github.com/sid2u/invert-text#readme
- Issues: https://github.com/sid2u/invert-text/issues
- npm.io page: https://npm.io/package/invert-text

## Dependencies (1)

- [commander](https://npm.io/package/commander.md) ^8.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2022-08-25
- 0.2.0 — 2021-06-28
- 0.1.0 — 2021-06-27

## README

## invert-text

A simple tool to generate inverted/upside-down/australiaized/upended/upturned text.
Generates inverted text using Unicode characters.

A better mechanism for testing Localization (L10N) compared to translations of a different language, for two reasons:
  * It's easy to quickly generate a JSON with inverted texts. (You don't need a paid translation API).
  * When testing l10n on the interface, it's easy to identify if the right word/phrase is being translated (_just need to rotate your head enough_ 🙃 ).

### Examples
| Original | Inverted |
|----------|----------|
|the quick brown fox jumps over the lazy dog.|.ƃop ʎzɐʅ ǝɥʇ ɹǝʌo sdɯnɾ xoⅎ uʍoɹq ʞɔᴉnb ǝɥʇ|
|THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.|.⅁Oᗡ ⅄Z∀⅂ ƎHꓕ ꓤƎɅO SԀWՈᒋ XOᖵ NMOꓤꓭ ꓘϽIՈꝹ ƎHꓕ|
|9876543210|0⇂ᄅƐh59ㄥ86|
|Random %^&* Characters !@#$ in ()+,./-_ between|uǝǝʍʇǝq _-/.,+() uᴉ $#@! sɹǝʇɔɐɹɐɥϽ *&^% ɯopuɐꓤ|
|(parentheses) [brackets] {braces}|{sǝɔɐɹq} [sʇǝʞɔɐɹq] (sǝsǝɥʇuǝɹɐd)|


### Installation
  * Install `Node.js` and `npm`
  * Install the `invert-text` CLI globally using `npm i -g invert-text`
    + Or, run it directly using `npx`


### Usage
#### Invert a JSON file
To invert all leaf-level text phrases in a given JSON file, use the `invert-text` command as below:
```console
foo@bar:~$ invert-text -i path/to/input.json -o path/to/output.json

✅ Generated the inverted output file at "path/to/output.json"
```

#### Invert phrase(s)
To invert single/multiple text phrases, use the `invert-text` command as below:
```console
foo@bar:~$ invert-text -p this that "and something else"

sᴉɥʇ
ʇɐɥʇ
ǝsʅǝ ƃuᴉɥʇǝɯos puɐ
```


### ⚠️&nbsp; Limitations
  * Works mainly with __AlphaNumeric__ characters. Most other characters are returned without any inversion.
  * Depending on the __font__ used, some of the inverted characters can look odd/incorrect when inverted.

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