Skip to content

Remove diacricts from your local language and create universial strings

Notifications You must be signed in to change notification settings

kaangokdemir/deumlaut

Repository files navigation

Deumlaut

License: MIT npm package downloads size

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

License

MIT

About

Remove diacricts from your local language and create universial strings

Resources

Stars

Watchers

Forks

Packages

No packages published