Skip to content
Branch: master
Find file History
Latest commit 8ebd27e Apr 14, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md 🔖 v0.3.5 Apr 14, 2019
helpers.ts 🎉 Initial commit Apr 13, 2019
mod.ts
mod_bench.ts
mod_test.ts ♻️ chore: Minor code refactoring Apr 14, 2019

README.md

normalize_diacritics

Remove accents/ diacritics in string


Version MIT License

Simple deno module to remove any accents/ diacritics found in a string.

Table of contents

Usage

/** Import from GH via `denopkg` */
import { normalize } from "https://denopkg.com/motss/deno_mod@v0.3.5/normalize_diacritics/mod.ts";

(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

You can’t perform that action at this time.