Socket
Socket
Sign inDemoInstall

uslug

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

index.js

@@ -1,1 +0,1 @@

module.exports = require('./lib/slugify');
module.exports = require('./lib/uslug');

@@ -31,8 +31,8 @@ (function() {

if (val) {
if ('LN'.indexOf(val) != -1) rv.push(c);
if ('Z'.indexOf(val) != -1) rv.push(' ');
if (~'LN'.indexOf(val)) rv.push(c);
if (~'Z'.indexOf(val)) rv.push(' ');
}
}
slug = rv.join('').replace(/^\s+|\s+$/g, '').replace(/\s+/g,' ');
if (!spaces) slug = slug.replace(/\s+/g,'-').replace(/-+/g,'-');
if (!spaces) slug = slug.replace(/[\s\-]+/g,'-');
if (lower) slug = slug.toLowerCase();

@@ -39,0 +39,0 @@ return slug;

{
"name" : "uslug",
"version" : "1.0.0",
"version" : "1.0.1",
"description" : "A permissive slug generator that works with unicode.",

@@ -5,0 +5,0 @@ "author": "Jeremy Selier <jerem.selier@gmail.com>",

@@ -35,7 +35,6 @@ # Uslug.js

* string - The string you want to slugify.
* options - An optional object that can contain:
allowedChars: a String of chars that you want to be whitelisted.
Default: '-_~'.
lower: a Boolean to force to lower case the slug. Default: true.
spaces: a Boolean to allow spaces. Default: false.
* options - An optional object that can contain:
* allowedChars: a String of chars that you want to be whitelisted. Default: '-_~'.
* lower: a Boolean to force to lower case the slug. Default: true.
* spaces: a Boolean to allow spaces. Default: false.

@@ -42,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc