Skip to content

Latest commit

 

History

History

normalize-diacritics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

normalize-diacritics

Remove accents/ diacritics in string


MIT License

Remove accents/ diacritics found inside a string.

Table of contents

Usage

import { normalize } from 'nodemod/dist/normalize-diacritics/index.js';

(async () => {
  const str = "söme stüff with áccènts";

  await normalize(str); /** 'some stuff with accents' */
})();

API Reference

normalize([input])

  • 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.

normalizeSync([input])

This methods works the same as normalize([input]) except that this is the synchronous version.

License

MIT License © Rong Sen Ng