laravel-slug
Advanced tools
Comparing version 2.4.1 to 2.4.2
@@ -6,2 +6,4 @@ /** | ||
*/ | ||
var XRegExp = require('xregexp'); | ||
var char_map = { | ||
@@ -164,4 +166,4 @@ '0' : ['°', '₀', '۰', '0'], | ||
var saveOldString = s; | ||
var alnum = RegExp('[^' + opt.delimiter + '\\d\\w\\s\\u4e00-\\u9eff]+', 'ig'); | ||
s = s.replace(alnum, ''); | ||
var allWeirdCharsRegExp = XRegExp("[^\\p{L}\\p{N}- _"+ opt.delimiter +"]", 'gi'); | ||
s = XRegExp.replace(s, allWeirdCharsRegExp, ''); | ||
if (!s.length) s = saveOldString; | ||
@@ -168,0 +170,0 @@ |
{ | ||
"name": "laravel-slug", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Tries to mimick the slugs produced by Laravel", | ||
@@ -10,3 +10,6 @@ "main": "index.js", | ||
"author": "Abe Fehr & Alessandro Marin", | ||
"license": "ISC" | ||
"license": "ISC", | ||
"devDependencies": { | ||
"xregexp": "^4.2.0" | ||
} | ||
} |
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
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
11307
209
1
1