react-slugify
Advanced tools
Comparing version 2.0.1 to 2.0.2
"use strict"; | ||
exports.__esModule = true; | ||
var stripAccents = function (str) { | ||
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; | ||
var fixes = 'AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz'; | ||
var accents = 'ÀÁÂÃÄÅĄàáâãäåąÒÓÔÕÕÖØòóôõöøÈÉÊËĘèéêëðęÇĆçćÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠŚšśŸÿýŽŹŻžźżŁłŃń'; | ||
var fixes = 'AAAAAAAaaaaaaaOOOOOOOooooooEEEEEeeeeeeCCccDIIIIiiiiUUUUuuuuNnSSssYyyZZZzzzLlNn'; | ||
var split = accents.split('').join('|'); | ||
@@ -13,9 +13,5 @@ var reg = new RegExp("(" + split + ")", 'g'); | ||
}; | ||
// *+~.()\'"!:@ | ||
// const blacklist = ['*', '+', '~', '.', '(', ')', '\\', "'", '"', '!', ':', '@']; | ||
var harmonize = function (text, delimiter, ignoreInvalid) { | ||
if (ignoreInvalid === void 0) { ignoreInvalid = false; } | ||
var harmonized = stripAccents(text) | ||
.trim() | ||
.toLowerCase(); | ||
var harmonized = stripAccents(text).trim().toLowerCase(); | ||
if (ignoreInvalid) { | ||
@@ -22,0 +18,0 @@ return harmonized.replace(/\s+/g, delimiter); |
{ | ||
"name": "react-slugify", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Slugify a React node", | ||
@@ -5,0 +5,0 @@ "main": "dist/slugify.js", |
Sorry, the diff of this file is not supported yet
7999
67