Socket
Socket
Sign inDemoInstall

diacritics

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diacritics - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

12

index.js

@@ -281,6 +281,12 @@ var DIACRITICS_REMOVAL_MAP = [

var ALL_ASCII_REGEX = /^[\x00-\x7f]*$/;
exports.remove = function (str) {
var i, removal;
for (i = 0; i < MAP_LENGTH; ++i) {
removal = DIACRITICS_REMOVAL_MAP[i];
if (ALL_ASCII_REGEX.test(str)) {
// this code path is roughly 15x faster (at the time of writing),
// and it is the common case.
return str;
}
for (var i = 0; i < MAP_LENGTH; ++i) {
var removal = DIACRITICS_REMOVAL_MAP[i];
str = str.replace(removal.regex, removal.base);

@@ -287,0 +293,0 @@ }

{
"name": "diacritics",
"version": "1.0.1",
"version": "1.0.2",
"description": "remove diacritics from strings",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc