remove-accents
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -222,2 +222,3 @@ var characterMap = { | ||
"š": "s", | ||
"ß": "ss", | ||
"Ţ": "T", | ||
@@ -402,2 +403,6 @@ "ţ": "t", | ||
"z̧": "z", | ||
"й":"и", | ||
"Й":"И", | ||
"ё":"е", | ||
"Ё":"Е", | ||
}; | ||
@@ -404,0 +409,0 @@ |
{ | ||
"name": "remove-accents", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Converting the accented characters to their corresponding non-accented ASCII characters.", | ||
"main": "index.js", | ||
"dependencies": { | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
@@ -40,3 +38,8 @@ "tape": "^4.2.2" | ||
"andreialecu", | ||
"Soreine" | ||
"Soreine", | ||
"CodeMan99", | ||
"gollenia", | ||
"glebtv", | ||
"jsnajdr", | ||
"Alorel" | ||
], | ||
@@ -43,0 +46,0 @@ "bugs": { |
@@ -10,2 +10,3 @@ # remove-accents | ||
[![Build Status](https://travis-ci.org/tyxla/remove-accents.svg)](https://travis-ci.org/tyxla/remove-accents) | ||
[![Unit tests](https://github.com/tyxla/remove-accents/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/tyxla/remove-accents/actions/workflows/unit-tests.yml) | ||
@@ -12,0 +13,0 @@ ## About |
18
test.js
@@ -5,5 +5,5 @@ var tape = require('tape'); | ||
tape('remove accents from string', function(t) { | ||
var input = 'ÀÁÂÃÄÅẤẮÆẦẰÇḈÈÉÊËẾḖỀḔÌÍÎÏḮÐÑÒÓÔÕÖØỐṌṒÙÚÛÜÝàáâãäåấắæầằçḉèéêëếḗềḕìíîïḯñòóôõöøốṍṓùúûüýÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģǴǵĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķḰḱĹĺĻļĽľĿŀŁłḾḿŃńŅņŇňʼnŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵẂẃŶŷŸŹźŻżŽžſƒƠơƯưǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜỨứṸṹǺǻǼǽǾǿðÞþṔṕṤṥX́x́ЃѓЌќA̋a̋E̋e̋I̋i̋ǸǹỒồṐṑỪừẀẁỲỳȀȁȄȅȈȉȌȍȐȑȔȕẲẴẶḜẳẵặḝC̆c̆ḪḫK̆k̆M̆m̆N̆n̆P̆p̆R̆r̆T̆t̆V̆v̆X̆x̆Y̆y̆ȂȆȊȎȃȇȋȏȒȓȖȗșțȘȚB̌b̌F̌f̌ǦǧȞȟJ̌ǰǨǩM̌m̌P̌p̌Q̌q̌ṦṧV̌v̌W̌w̌X̌x̌Y̌y̌A̧a̧B̧b̧ḐḑȨȩƐ̧ɛ̧ḨḩI̧i̧Ɨ̧ɨ̧M̧m̧O̧o̧Q̧q̧U̧u̧X̧x̧Z̧z̧'; | ||
var input = 'ÀÁÂÃÄÅẤẮÆẦẰÇḈÈÉÊËẾḖỀḔÌÍÎÏḮÐÑÒÓÔÕÖØỐṌṒÙÚÛÜÝàáâãäåấắæầằçḉèéêëếḗềḕìíîïḯñòóôõöøốṍṓùúûüýÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģǴǵĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķḰḱĹĺĻļĽľĿŀŁłḾḿŃńŅņŇňʼnŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵẂẃŶŷŸŹźŻżŽžſƒƠơƯưǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜỨứṸṹǺǻǼǽǾǿðÞþṔṕṤṥX́x́ЃѓЌќA̋a̋E̋e̋I̋i̋ǸǹỒồṐṑỪừẀẁỲỳȀȁȄȅȈȉȌȍȐȑȔȕẲẴẶḜẳẵặ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aeioRrUustSTBbFfGgHhJjKkMmPpQqSsVvWwXxYyAaBbDdEeEeHhIiIiMmOoQqUuXxZzss'; | ||
@@ -15,4 +15,14 @@ t.same( output, expected ); | ||
tape('remove cyrillic accents from string', function(t) { | ||
var input = 'ЁёЙй'; | ||
var output = removeAccents(input); | ||
var expected = 'ЕеИи'; | ||
t.same( output, expected ); | ||
t.end(); | ||
}); | ||
tape('do not modify non-accented strings', function(t) { | ||
var input = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789.,:;~`!@#$%^&*()-_=+[]{}\'"|\\<>?/'; | ||
var input = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789.,:;~`!@#$%^&*()-_=+[]{}\'"|\\<>?/eEиИ'; | ||
var output = removeAccents(input); | ||
@@ -40,4 +50,4 @@ | ||
t.same(removeAccents.remove('Pokémon'), 'Pokemon'); | ||
t.same(removeAccents.remove('Straße'), 'Strasse'); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
12248
8
468
65
0