Simple deno module to remove any accents/ diacritics found in a string.
/** Import from GH via `denopkg` */
import { normalize } from "https://cdn.jsdelivr.net/gh/motss/[email protected]/normalize_diacritics/mod.ts";
(async () => {
const str = "söme stüff with áccènts";
await normalize(str); // 'some stuff with accents'
})();
input
<?string> Optional input string that contains accents/ diacritics.- returns: <Promise<string>> Promise which resolves with normalized input string.
This method normalizes any accents/ diacritics found in a given input string and output a normalized string as a result.
This methods works the same as normalize([input])
except that this is the synchronous version.
MIT License © Rong Sen Ng