1.0.1 • Published 8 months ago

umlaut-escape v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

escape-umlaut

Description

escape-umlaut is a small JavaScript package that provides a single function for escaping special characters like umlauts (e.g. õ, ä, ö, ü) in a given string. The special characters are replaced with their respective HTML entities. For a full list of currently supported HTML entities, see the Current special characters map at the end of this README.

Installation

You can install this package via npm:

npm install umlaut-escape

Usage

Import the escapeUmlaut function and use it to escape special characters in a string:

import { escapeUmlaut } from "umlaut-escape";

const inputString = "Hällo Wörld";
const escapedString = escapeUmlaut(inputString);

console.log(escapedString); // Output: 'Hällo WÖrld'

API

escapeUmlaut(input: string): string This function takes a string input as its parameter and returns a new string with special characters, such as umlauts (ä, ö, ü), replaced with their respective non-special characters.

License

This package is released under the MIT License. See the LICENSE file for more details.

Issues

If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.

Author

This package was created by Toomas Jaska.

Changelog

See the CHANGELOG.md file for details about changes and version history.

Current special characters map

CharacterHTML Entity
ŸŸ
ÿÿ
ÜÜ
üü
ÖÖ
öö
ÏÏ
ïï
ËË
ëë
ÄÄ
ää
ÀÀ
ÁÁ
ÂÂ
ÃÃ
ÅÅ
ÆÆ
ÇÇ
ÈÈ
ÉÉ
ÊÊ
ÌÌ
ÍÍ
ÎÎ
ÐÐ
ÑÑ
ÒÒ
ÓÓ
ÔÔ
ÕÕ
ØØ
ŒŒ
ÙÙ
ÚÚ
ÛÛ
ÝÝ
ÞÞ
àà
áá
ââ
ãã
åå
ææ
çç
èè
éé
êê
ìì
íí
ðð
ññ
òò
óó
ôô
õõ
øø
œœ
ùù
úú
ûû
ýý
þþ
ŠŠ
šš
ČČ
čč