npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

js-romanian-diacritics

v1.0.1

Published

Functions for converting Romanian diacritics from a text (converting characters - standard to traditional or traditional to standard, remove diacritics marks)

Readme

js-romanian-diacritics

Functions for converting Romanian diacritics from a text (converting characters - standard to traditional or traditional to standard, remove diacritics marks)

Usage

Standard/official diacritics

The standard function takes a string as an argument and replaces all of its traditional/incorrect Romanian diacritics with their corresponding standard/official counterpart.

const diacritics = require("js-romanian-diacritics");
diacritics.standard("Aştept să vinã colegii de muncã.");
  // Output: Aștept să vină colegii de muncă.

Traditional/incorrect diacritics

The traditional function takes a string as an argument and replaces all of its standard/official Romanian diacritics with their corresponding traditional/incorrect counterpart.

const diacritics = require("js-romanian-diacritics");
diacritics.traditional("Aștept să vină colegii de muncă.");
  // Output: Aştept să vinã colegii de muncã.

Without diacritics

The without function takes a string as an argument and replaces all the Romanian diacritics (the official character set, as well as incorrect representations of them) with their accentless counterpart.

const diacritics = require("js-romanian-diacritics");
diacritics.without("Aştept să vină colegii de muncă.");
  // Output: Astept sa vina colegii de munca.

Character set

There are six Romanian-specific characters that are incorrectly implemented in all Microsoft Windows versions before Vista:

U+0218 Ș LATIN CAPITAL LETTER S WITH COMMA BELOW – incorrectly implemented as U+015E Ş LATIN CAPITAL LETTER S WITH CEDILLA U+0219 ș LATIN SMALL LETTER S WITH COMMA BELOW – incorrectly implemented as U+015F ş LATIN SMALL LETTER S WITH CEDILLA U+021A Ț LATIN CAPITAL LETTER T WITH COMMA BELOW – incorrectly implemented as U+0162 Ţ LATIN CAPITAL LETTER T WITH CEDILLA U+021B ț LATIN SMALL LETTER T WITH COMMA BELOW – incorrectly implemented as U+0163 ţ LATIN SMALL LETTER T WITH CEDILLA U+0102 Ă LATIN CAPITAL LETTER A WITH BREVE – incorrectly implemented as U+00E3 ã LATIN CAPITAL LETTER A WITH TILDE U+0103 ă LATIN SMALL LETTER A WITH BREVE – incorrectly implemented as U+00C3 Ã LATIN SMALL LETTER A WITH TILDE

These Unicode characters are the correct representations of Romanian diacritics:

| Character | Unicode value | Unicode name | | --------- | ------------- | --------------------------------------- | | Ă | U+0102 | LATIN CAPITAL LETTER A WITH BREVE | | ă | U+0103 | LATIN SMALL LETTER A WITH BREVE | | Â | U+00C2 | LATIN CAPITAL LETTER A WITH CIRCUMFLEX | | â | U+00E2 | LATIN SMALL LETTER A WITH CIRCUMFLEX | | Î | U+00CE | LATIN CAPITAL LETTER S WITH CIRCUMFLEX | | î | U+00EE | LATIN SMALL LETTER S WITH CIRCUMFLEX | | Ț | U+021A | LATIN CAPITAL LETTER T WITH COMMA BELOW | | ș | U+0219 | LATIN SMALL LETTER S WITH COMMA BELOW | | Ț | U+021A | LATIN CAPITAL LETTER T WITH COMMA BELOW | | ț | U+021B | LATIN SMALL LETTER T WITH COMMA BELOW |

Inspired by:

This project is inspired and it is a refinement of js-ro-diacritics

https://github.com/esevo-tech/js-ro-diacritics