0.5.0 • Published 8 months ago

remove-accents v0.5.0

Weekly downloads
431,707
License
MIT
Repository
github
Last release
8 months ago

remove-accents

Removes the accents from a string, converting them to their corresponding non-accented ASCII characters.

npm install remove-accents

Unit tests

About

An easy to use solution for converting all accented characters to their corresponding non-accented ASCII characters.

Syntax

import removeAccents from 'remove-accents';

removeAccents(inputString)

Alternatively, you could use the CommonJS syntax to import it:

const removeAccents = require('remove-accents');

inputString

The string that you wish to remove accents from.

Usage

Call removeAccents() by passing the string you wish to remove accents from, and you will get the non-accented string as result.

const input = 'ÀÁÂÃÄÅ';
const output = removeAccents(input);

console.log(output); // AAAAAA

Methods

The exported function also has helper methods.

has

Determine if a string has any accented characters.

import removeAccents from 'remove-accents';

console.log(removeAccents.has('ÀÁÂÃÄÅ')); // true
console.log(removeAccents.has('ABC'));    // false

remove

Alias of removeAccents.

import removeAccents from 'remove-accents';

console.log(removeAccents.remove('ÀÁÂÃÄÅ')); // AAAAAA

License

MIT

@busyapi/mempass-jssb-collection-file@accounting-query-language/engine@determapp/viewer-data-generatordominio-atendimento@qrea/aql@payment-rails/afx-api-v2@qrea/comptafifa-bot-tasks@infinitebrahmanuniverse/nolb-remo@everything-registry/sub-chunk-2649@aero/sanitizer@dicelette/core@eatingdots/title@empye/core@alfonsobries/xlsx-laravel-spreadsheet-importereventsquare-gate@limegroup/lime-rs-componentsfe-angular-globalnemjs@cityssm/unleet@burh/nuxt-core@busyapi/mempassfourcoreshas-text@please.com/serverless-modelshubot-detailed-helphorizon-youtube-mp3generator-stack-nodegood-censor@foxxie/sanitize@golocalinteractive/storage-essentials-components@gigigo/docbooksgeneric-matcheridb-suggester@remp/remp-segment-builder@reuters-graphics/server-clientkmk-node-pagsegurokeystone-blocks@textkernel/oneuilegi@insomnia-dev/miscord@s-ui/js@spaceshiphk/spaceship-ui@tanstack/match-sorter-utils@tanstack-rtl/match-sorter-utils@sbesson/json-db@googleforcreators/story-editor@financial-times/g-components@financial-times/politicsitdlibjazz-corekotliklunatic-suggestermakemkv-utilsspens@wordpress/dataviewsnautiljon-scrapernautiljon-scraper-modneapolitan-wrappercode-cloudpelias-parserpelias-labelsbr_statesps-guitruly-uniquecensoring.jstweeter-clientmiscordmiscord-beta@wordpress/urlmongoose-transform-field-pluginmatch-sorter@vivareal/javascript-utilsbaaka-itachistore-indexnovel-crawler-vnnames-classification@zionapps/coreadafruit-mcp23008-ssd1306-node-drivernensaurelia-resourcesaurelia-resources-extraautomarkerautosuggest-highlightpelias-analysispelias-apidilarslprsanitazerosaenlg-pluralize-esentity-serves
0.5.0

8 months ago

0.4.4

1 year ago

0.4.3

2 years ago

0.4.2

6 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago