deumlaut
v0.0.4
Published
Remove diacricts from your local language and create universial strings.
Downloads
7
Readme
Deumlaut
A lightweight zero dependency libray to replace Umlauts (Diacritics) from your strings.
npm i deumlaut
# or
yarn add deumlaut
Usage
const { deumlaut } = require('deumlaut')
// or
import { deumlaut } from 'deumlaut'
deumlaut('Tschüss') // Tschuess
deumlaut('Çarşı', 'tr') // Carsi
// For more examples, you can check the "tests" folder.
Parameters
| Position | Name | Description | Required | Type |
| -------- | ------- | --------------------------------------------- | -------- | ------------------------ |
| 1 | Text | Text to remove diacritics | true
| string
|
| 2 | Locale | Your language to parse | false
| 'de'
or 'tr'
|
| 3 | Options | Deumlaut options. See Options for the details | false
| DeumlautOptions
object |
Options
| Name | Type | Default Value | Description |
| ------------ | --------- | ------------- | -------------------------------------- |
| capitalize
| boolean
| false
| Capitalizes the diacritic equilavants. |
Supported Languages
- Currently only German and Turkish are supported.
Contributing
Please check CONTRIBUTING.md
TODO
- Improve Documentation
- Add More Unit tests
- Improve support for other languages
Contributors
Kaan Gökdemir - Author (@kaangokdemir) - kaangokdemir.com