contract-query/frontend/node_modules/remove-accents
2025-08-14 15:03:33 -05:00
..
.github/workflows initial commit 2025-08-14 15:03:33 -05:00
index.d.ts initial commit 2025-08-14 15:03:33 -05:00
index.js initial commit 2025-08-14 15:03:33 -05:00
jest.config.js initial commit 2025-08-14 15:03:33 -05:00
LICENSE initial commit 2025-08-14 15:03:33 -05:00
package.json initial commit 2025-08-14 15:03:33 -05:00
README.md initial commit 2025-08-14 15:03:33 -05:00
test.js initial commit 2025-08-14 15:03:33 -05:00

remove-accents

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

npm install remove-accents

Unit tests

About

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

Syntax

import removeAccents from 'remove-accents';

removeAccents(inputString)

Alternatively, you could use the CommonJS syntax to import it:

const removeAccents = require('remove-accents');

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.

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

console.log(output); // AAAAAA

Methods

The exported function also has helper methods.

has

Determine if a string has any accented characters.

import removeAccents from 'remove-accents';

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

remove

Alias of removeAccents.

import removeAccents from 'remove-accents';

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

License

MIT