New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@plexis/without-diacritics

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plexis/without-diacritics - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

4

package.json
{
"name": "@plexis/without-diacritics",
"version": "0.0.8",
"version": "0.0.9",
"main": "dist/index.js",

@@ -25,3 +25,3 @@ "module": "dist/index.esm.js",

},
"gitHead": "ba3ebd6492a002b8483add45fa098db086daec65"
"gitHead": "7a6a56e77ce7af97f9a3299a579d45ef1c594b6f"
}
/**
* @description Cleanups a string from diacritics
* @description Cleanups a string from diacritics.
* @param {String} text
* @example
* toPred('áéíóú') // returns 'aeiou'
* withoutDiacritics('áéíóú') // returns 'aeiou'
*/

@@ -7,0 +7,0 @@ const withoutDiacritics = text => text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');

@@ -6,1 +6,15 @@ import withoutDiacritics from '../src';

});
it('removes any diacritics for Greek', () => {
expect(withoutDiacritics('Άά Έέ Ήή Ίί Όό Ύύ Ώώ ΐ ΰ Ϊϊ Ϋϋ')).toBe(
'Αα Εε Ηη Ιι Οο Υυ Ωω ι υ Ιι Υυ'
);
});
it('removes any diacritics for Latvian', () => {
expect(withoutDiacritics('āēīūčģķļņšž')).toBe('aeiucgklnsz');
});
it('removes any diacritics for Czech', () => {
expect(withoutDiacritics('č ď ě ň ř š ť ž')).toBe('c d e n r s t z');
});
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