Skip to content

Instantly share code, notes, and snippets.

View pammacdotnet's full-sized avatar

Alberto Corbi pammacdotnet

View GitHub Profile
/**
* Returns the string with accented and non-standard Latin-based characters converted into ASCII approximate equivalents.
*
* @returns {String}
*/
String.prototype.normalize = function() {
var NormalizeSource = {
'A': /[AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ]/g,
'B': /[BⒷBḂḄḆɃƂƁ]/g,
'C': /[CⒸCĆĈĊČÇḈƇȻꜾ]/g,