Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clean-special-chars

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-special-chars - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

21

lib/clean-special-chars.js

@@ -0,15 +1,14 @@

/**
* By default converts accented letters to its cleaned form like "Ã" to "A", Spaces to "-" and "&" to "and".
* Also returns the text in Lower Case
*
* New rules that should run before de default cleaning can be passed as a parameter
*
* @param {String} str - Text to be cleaned
* @param {Object Literal} replaceRules - Specific rules
* @return {String} Text cleaned and in lower case
*/
var cleanSpecialChars = function(str, replaceRules) {
'use strict';
/**
* By default converts accented letters to its cleaned form like "Ã" to "A", Spaces to "-" and "&" to "and".
* Also returns the text in Lower Case
*
* New rules that should run before de default cleaning can be passed as a parameter
*
* @param {String} str - Text to be cleaned
* @param {JSON} replaceRules - Specific rules
* @return {String} Text cleaned and in lower case
*/
if (!str)

@@ -16,0 +15,0 @@ return;

{
"name": "clean-special-chars",
"version": "1.0.4",
"version": "1.0.5",
"description": "Converts accented letters to its cleaned form like 'Ã' to 'A', 'ç' to 'c', '&!*' to '', etc. All spaces will be converted to '-' and the text is returned in Lower Case",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/DiegoZoracKy/clean-special-chars",

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