Comparing version 0.9.1 to 0.9.2
{ | ||
"name": "slug", | ||
"version": "0.9.1", | ||
"homepage": "https://github.com/dodo/node-slug", | ||
"version": "0.9.2", | ||
"homepage": "https://github.com/Trott/node-slug", | ||
"authors": [ | ||
@@ -6,0 +6,0 @@ "▟ ▖▟ ▖ <dodo.the.last@gmail.com>" |
@@ -1,23 +0,41 @@ | ||
{ "name": "slug" | ||
, "description": "slugifies even utf-8 chars!" | ||
, "version": "0.9.1" | ||
, "homepage": "https://github.com/dodo/node-slug" | ||
, "author": "dodo (https://github.com/dodo)" | ||
, "repository": {"type": "git", "url": "git://github.com/dodo/node-slug.git"} | ||
, "main": "slug.js" | ||
, "engines": {"node": ">= 0.4.x"} | ||
, "keywords": ["slugify", "slug", "string", "utf8", "utf-8", "unicode", "url"] | ||
, "scripts": { | ||
"test": "./node_modules/.bin/mocha ./test/*.test.* --require should --reporter spec --colors --compilers coffee:coffee-script/register"} | ||
, "dependencies": { | ||
"unicode": ">= 0.3.1"} | ||
, "devDependencies": { | ||
"mocha": "~1.17.1", | ||
"should": "~3.1.2", | ||
"coffee-script": "~1.7.1"} | ||
, "bin": { | ||
"slug": "bin/slug.js"} | ||
, "licenses" : [ | ||
{ "type": "MIT" , | ||
"url": "http://github.com/dodo/node-slug/raw/master/LICENSE"} ] | ||
{ | ||
"name": "slug", | ||
"description": "slugifies even utf-8 chars!", | ||
"version": "0.9.2", | ||
"homepage": "https://github.com/Trott/node-slug", | ||
"author": "dodo (https://github.com/dodo)", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/Trott/node-slug.git" | ||
}, | ||
"main": "slug.js", | ||
"keywords": [ | ||
"slugify", | ||
"slug", | ||
"string", | ||
"utf8", | ||
"utf-8", | ||
"unicode", | ||
"url" | ||
], | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha ./test/*.test.* --require should --reporter spec --colors --compilers coffee:coffee-script/register" | ||
}, | ||
"dependencies": { | ||
"unicode": ">= 0.3.1" | ||
}, | ||
"devDependencies": { | ||
"coffee-script": "~1.7.1", | ||
"mocha": "^5.2.0", | ||
"should": "~3.1.2" | ||
}, | ||
"bin": { | ||
"slug": "bin/slug.js" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://github.com/Trott/node-slug/raw/master/LICENSE" | ||
} | ||
] | ||
} |
@@ -38,5 +38,8 @@ # [slug](https://github.com/dodo/node-slug) | ||
slug.charmap['♥'] = 'freaking love' // change default charmap or use option {charmap:{…}} as 2. argument | ||
print(slug('I ♥ UNICODE', {lowercase: false})) // If you prefer not lower case | ||
print(slug('I ♥ UNICODE')) | ||
// > I-freaking-love-UNICODE | ||
print(slug('☏-Number', {lower: true})) // If you prefer lower case | ||
// > telephone-number | ||
print(slug('i <3 unicode')) | ||
@@ -65,3 +68,3 @@ // > i-love-unicode | ||
replacement: '-', | ||
symbols. true, | ||
symbols: true, | ||
remove: /[.]/g, | ||
@@ -68,0 +71,0 @@ lower: false, |
@@ -57,3 +57,3 @@ (function (root) { | ||
} | ||
char = char.replace(/^\s+|\s+$/g, ''); | ||
char = char.trim(); | ||
} | ||
@@ -65,3 +65,3 @@ } | ||
} | ||
result = result.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces | ||
result = result.trim(); | ||
result = result.replace(/[-\s]+/g, opts.replacement); // convert spaces | ||
@@ -68,0 +68,0 @@ result = result.replace(opts.replacement+"$",''); // remove trailing separator |
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
87
0
26812
9
234
1