Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

remove-accents-esm

ramiroaisen239MIT0.0.1TypeScript support: included

Converting the accented characters to their corresponding non-accented ASCII characters.

esm, modules, module, accent, accents, remove, diacritic, clean, formatting, umlaut, grave, circumflex, tilde, acute

readme

This is the module version of remove-accents npm package

remove-accents

Removes the accents from a string, converting them to their corresponding non-accented ASCII characters.

npm install remove-accents-esm

About

An easy to use solution for converting all accented characters to their corresponding non-accented ASCII characters.

Syntax

import removeAccents from "remove-accents-esm";
removeAccents(inputString)

inputString

The string that you wish to remove accents from.

Usage

Call removeAccents() by passing the string you wish to remove accents from, and you will get the non-accented string as result.

import removeAccents from "remove-accents-esm";

var input = 'ÀÁÂÃÄÅ';
var output = removeAccents(input);

console.log(output); // AAAAAA

Methods

The exported function also has helper methods.

hasAccents

Determine if a string has any accented characters.

import { hasAccents } from "remove-accents-esm";

console.log(hasAccents('ÀÁÂÃÄÅ')); // true
console.log(hasAccents('ABC'));    // false

named export removeAccents

Alias of default export.

import { removeAccents } = from "remove-accents-esm";

console.log(removeAccents('ÀÁÂÃÄÅ')); // AAAAAA

License

MIT