# latinize

> Simple library to convert accents (diacritics) from strings to latin characters.

Latest version **2.0.0** (published 2023-10-10) · BSD license · 0 weekly downloads

## Install

```sh
npm install latinize
pnpm add latinize
yarn add latinize
bun add latinize
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-10-10 |
| First published | 2013-04-02 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | separate (@types/latinize) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 150 |
| Author | Jakub Dundalek |
| Maintainers | dundalek |
| Keywords | string, latinize, latinise, accents, diacritics |

## Links

- npm: https://www.npmjs.com/package/latinize
- Repository: https://github.com/dundalek/latinize
- Issues: https://github.com/dundalek/latinize/issues
- npm.io page: https://npm.io/package/latinize

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-10-10
- 1.0.0 — 2023-10-10
- 0.6.0 — 2023-10-10
- 0.5.0 — 2021-01-17
- 0.4.1 — 2020-03-02
- 0.4.0 — 2016-10-23
- 0.3.0 — 2016-09-16
- 0.2.0 — 2015-03-06
- 0.1.0 — 2013-04-02

## README

# Latinize.js

Simple library to convert accents (diacritics) from strings to latin characters.

## Install

```
npm install latinize
```

For CommonJS module format use the 1.x version
```
npm install latinize@1
```

## Usage

ES module

```javascript
import latinize from 'latinize';
latinize('ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů'); // => 'ExAmPlE aeiouycdenrstzu'
```

You can use the `latinize.characters` object to access the translation table and pass custom mapping as a second argument:

```javascript
// modify the behavior for German umlauts
const characters = {
  ...latinize.characters,
  'Ä': 'Ae', 'Ö': 'Oe', 'Ü': 'Ue', 'ä': 'ae', 'ö': 'oe', 'ü': 'ue'
};
latinize('ÄÖ', characters) // => "AeOe"
```

## Details

Is is a lookup table taken from [http://jsperf.com/latinize](http://jsperf.com/latinize) packaged for node and browser. Visit the link to see more approaches.

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