Skip to content

igorskyflyer/npm-duoscribi

Repository files navigation

Icon of DúöScríbî (DuoScribi) - a TypeScript package for converting diacritics to ASCII letters

DúöScríbî (DuoScribi)

Blazing‑Fast Conversion • ASCII‑Clean Output • Zero‑Noise Normalization • Trusted by Devs Worldwide

✒ DúöScríbî allows you to convert letters with diacritics to regular letters. 🤓


📃 Table of Contents


🤖 Features

  • 🚀 Blazing‑fast at ~900K ops/sec1 across 508 Unicode chars
  • ⚡ Converts diacritics to plain ASCII instantly
  • 🧠 Handles full Unicode range with mapped rules
  • 🧹 Cleans up noisy input for search and indexing
  • 🔤 Preserves letter case while normalizing text
  • 🛠 Built with TypeScript for strong typing
  • 🧩 Uses a modular replacer (@igorskyflyer/mapped-replacer) for easy rule extension
  • 🚫 Returns empty string on invalid input
  • 📦 Lightweight and ready for npm projects


🕵🏼 Usage

Install it by executing any of the following, depending on your preferred package manager:

pnpm add @igorskyflyer/duoscribi
yarn add @igorskyflyer/duoscribi
npm i @igorskyflyer/duoscribi


🤹🏼 API

duoscribi(input: string): string

Converts letters with diacritics to regular, ASCII letters.

input: string - The string to convert.

Returns the converted string or an empty string otherwise.


💡 TIP

Supported Characters

To see the extensive list of 508 supported characters with diacritics, see the SUPPORTED_CHARS.md file.



🗒️ Examples

example.ts

import { duoscribi } from '@igorskyflyer/duoscribi'

duoscribi('Ťḥė ẅâÿ ţɵ ɡėţ șţãrţėd iș ţɵ quiţ ţālkinɡ ānd bėgin dɵinɡ')
// returns 'The way to get started is to quit talking and begin doing'


📝 Changelog

📑 Read about the latest changes in the CHANGELOG.



🪪 License

Licensed under the MIT license.



💖 Support

I work hard for every project, including this one and your support means a lot to me!
Consider buying me a coffee. ☕

Donate to igorskyflyer

Thank you for supporting my efforts! 🙏😊


🧬 Related

@igorskyflyer/keppo

🎡 Parse, manage, compare and output SemVer-compatible version numbers. 🛡


@igorskyflyer/str-is-in

🧵 Provides ways of checking whether a String is present in an Array of Strings using custom Comparators. 🔍


@igorskyflyer/encode-entities

🏃‍♂️ Fast and simple Map and RegExp based HTML entities encoder. 🍁


@igorskyflyer/unc-path

🥽 Provides ways of parsing UNC paths and checking whether they are valid. 🎱


@igorskyflyer/strip-html

🥞 Removes HTML code from the given string. Can even extract text-only from the given an HTML string. ✨




👨🏻‍💻 Author

Created by Igor Dimitrijević (@igorskyflyer).

Footnotes

  1. tested on an AMD 5825u.

Sponsor this project

Contributors