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

laravel-slug

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-slug - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

6

index.js

@@ -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"
}
}
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