Coder Social home page Coder Social logo

n1k0 / normalize-diacritics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from motss/normalize-diacritics

0.0 0.0 0.0 2.6 MB

Normalize diacritics in strings

Home Page: https://npm.im/normalize-diacritics

License: MIT License

TypeScript 98.04% Shell 1.96%

normalize-diacritics's Introduction

normalize-diacritics

Remove accents/ diacritics in string


Follow me

Version Node version MIT License

Downloads Total downloads Packagephobia Bundlephobia

CircleCI Dependency Status codecov Coverage Status

codebeat badge Codacy Badge Code of Conduct

Simple NPM package to remove any accents/ diacritics found in a string.

Table of contents

Pre-requisite

Install

# Install via NPM
$ npm i normalize-diacritics

Usage

TypeScript or ES Modules

import { normalize } from 'normalize-diacritics';

/** Assuming top-level await is enabled... */
await normalize('söme stüff with áccènts'); // 'some stuff with accents'

Browser

<script type="module">
  import { normalize } from 'https://cdn.skypack.dev/normalize-diacritics@latest';
  
  // --snip
</script>

Demo

Edit normalize-diacritics demo

deno

👉 Check out the deno module at deno_mod/normalize_diacritics.

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.

Contributing

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MIT License © Rong Sen Ng

normalize-diacritics's People

Contributors

motss avatar dependabot-preview[bot] avatar greenkeeper[bot] avatar alemangui avatar waffle-iron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.