Remove Accents and Convert Special Characters

This little module allows the removal of any accent from each character in a string text. It also converts special UTF-8 characters to the visually closest character.

Examples

é => e
œ => oe
ȸ => db
ß => ss // in the german language, those are interchangeable

Usage

Script:

const removeAccents = require('remove-accents')
const withAccent = 'exposé'
const withoutAccent = removeAccents(withAccent)
console.log(withoutAccent)

Output:

expose

Script:

import removeAccents from 'remove-accents'
const withAccent = 'exposé'
const withoutAccent = removeAccents(withAccent)
console.log(withoutAccent)

Output:

expose