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

speakingurl

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speakingurl - npm Package Compare versions

Comparing version 0.6.3 to 0.7.0

Changelog.md

2

bower.json
{
"name": "speakingurl",
"version": "0.6.3",
"version": "0.7.0",
"description": "Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.",

@@ -5,0 +5,0 @@ "main": "speakingurl.min.js",

@@ -5,3 +5,3 @@ {

"description": "Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.",
"version": "0.6.3",
"version": "0.7.0",
"keywords": [

@@ -8,0 +8,0 @@ "slug",

{
"name": "pid/speakingurl",
"version": "0.6.3",
"version": "0.7.0",
"type": "library",

@@ -5,0 +5,0 @@ "description": "Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.",

@@ -14,2 +14,4 @@ (function() {

var maintainCase = (typeof opts === 'object' && opts.maintainCase) || false;
var titleCase = (typeof opts === 'object' && opts.titleCase) ? opts.titleCase : false;
var customReplacements = (typeof opts === 'object' && typeof opts.custom === 'object' && opts.custom) ? opts.custom : {};
var separator = (typeof opts === 'object' && opts.separator) || '-';

@@ -22,3 +24,2 @@ var truncate = typeof opts === 'object' && opts.truncate;

var symbol = symbolMap[language] || symbolMap.en;
var customReplacements = (typeof opts === 'object' && opts.custom) || {};
var uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'];

@@ -35,2 +36,9 @@ var uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','];

if (titleCase && typeof titleCase.length === "number" && Array.prototype.toString.call(titleCase)) {
// custom config is an Array, rewrite to object format
titleCase.forEach(function(v) {
customReplacements[v + ""] = v + "";
});
}
if (typeof input !== 'string') {

@@ -71,2 +79,9 @@ return '';

if (titleCase) {
input = input.replace(/(\w)(\S*)/g, function(_, i, r) {
var j = i.toUpperCase() + (r !== null ? r : "");
return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase();
});
}
// escape all necessary chars

@@ -128,3 +143,3 @@ allowedChars = escapeChars(allowedChars);

if (!maintainCase) {
if (!maintainCase && !titleCase && !titleCase.length) {
result = result.toLowerCase();

@@ -588,2 +603,14 @@ }

'de': {
'∆': 'delta',
'∞': 'unendlich',
'♥': 'Liebe',
'&': 'und',
'|': 'oder',
'<': 'kleiner als',
'>': 'groesser als',
'∑': 'Summe von',
'¤': 'Waehrung'
},
'en': {

@@ -601,26 +628,14 @@ '∆': 'delta',

'pt': {
'es': {
'∆': 'delta',
'∞': 'infinito',
'♥': 'amor',
'&': 'e',
'|': 'ou',
'<': 'menor que',
'>': 'maior que',
'∑': 'soma',
'¤': 'moeda'
'&': 'y',
'|': 'u',
'<': 'menos que',
'>': 'mas que',
'∑': 'suma de los',
'¤': 'moneda'
},
'de': {
'∆': 'delta',
'∞': 'unendlich',
'♥': 'Liebe',
'&': 'und',
'|': 'oder',
'<': 'kleiner als',
'>': 'groesser als',
'∑': 'Summe von',
'¤': 'Waehrung'
},
'fr': {

@@ -638,12 +653,12 @@ '∆': 'delta',

'es': {
'pt': {
'∆': 'delta',
'∞': 'infinito',
'♥': 'amor',
'&': 'y',
'|': 'u',
'<': 'menos que',
'>': 'mas que',
'∑': 'suma de los',
'¤': 'moneda'
'&': 'e',
'|': 'ou',
'<': 'menor que',
'>': 'maior que',
'∑': 'soma',
'¤': 'moeda'
},

@@ -650,0 +665,0 @@

{
"name": "speakingurl",
"version": "0.6.3",
"description": "Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.",
"homepage": "http://pid.github.io/speakingurl/",
"github": "http://github.com/pid/speakingurl",
"repository": {
"type": "git",
"url": "git://github.com:pid/speakingurl.git"
},
"bugs": "https://github.com/pid/speakingurl/issues",
"licenses": [
{
"type": "BSD",
"url": "https://raw.github.com/pid/speakingurl/master/LICENSE"
}
],
"keywords": [
"slug",
"seo",
"url",
"speakingurl",
"speaking url",
"nice url",
"static url"
],
"categories": [
"Utilities",
"Parsers & Compilers"
],
"scripts": {
"test": "mocha"
},
"author": {
"name": "Sascha Droste",
"email": "pid@posteo.net",
"url": "https://twitter.com/SaschaDroste"
},
"main": "index",
"filename": "speakingurl.min.js",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.2",
"mocha": "~1.14.0",
"should": "~2.1.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-watch": "~0.5.1",
"grunt-release": "~0.6.0",
"grunt-bumpup": "~0.4.1",
"grunt-text-replace": "~0.3.6"
},
"testling": {
"harness": "mocha",
"files": "test/*.js",
"browsers": {
"ie": [
6,
7,
8,
9,
10
],
"firefox": [
19
],
"chrome": [
25
],
"safari": [
5.1,
6
],
"opera": [
10,
12
]
}
},
"jam": {
"name": "speakingurl",
"version": "0.7.0",
"description": "Generate a slug with a lot of options; create of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' from a string.",
"homepage": "http://pid.github.io/speakingurl/",
"github": "http://github.com/pid/speakingurl",
"repository": {
"type": "git",
"url": "git://github.com:pid/speakingurl.git"
},
"bugs": "https://github.com/pid/speakingurl/issues",
"licenses": [
{
"type": "BSD",
"url": "https://raw.github.com/pid/speakingurl/master/LICENSE"
}
],
"keywords": [
"slug",
"seo",
"url",
"speakingurl",
"speaking url",
"nice url",
"static url",
"transliteration"
],
"categories": [
"Utilities",
"Parsers & Compilers"
],
"scripts": {
"test": "mocha"
},
"author": {
"name": "Sascha Droste",
"email": "pid@posteo.net",
"url": "https://twitter.com/SaschaDroste"
},
"main": "index",
"filename": "speakingurl.min.js",
"dependencies": {},
"main": "speakingurl.min.js",
"shim": {
"deps": [],
"exports": [
"getSlug",
"createSlug"
]
"devDependencies": {
"grunt": "~0.4.2",
"mocha": "~1.14.0",
"should": "~2.1.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-watch": "~0.5.1",
"grunt-release": "~0.6.0",
"grunt-bumpup": "~0.4.1",
"grunt-text-replace": "~0.3.6"
},
"include": [
"speakingurl.min.js",
"README.md"
]
},
"volo": {
"url": "//cdnjs.cloudflare.com/ajax/libs/speakingurl/{version}/speakingurl.min.js"
},
"engines": {
"node": ">=0.8.0"
}
}
"testling": {
"harness": "mocha",
"files": "test/*.js",
"browsers": {
"ie": [
6,
7,
8,
9,
10
],
"firefox": [
19
],
"chrome": [
25
],
"safari": [
5.1,
6
],
"opera": [
10,
12
]
}
},
"jam": {
"dependencies": {},
"main": "speakingurl.min.js",
"shim": {
"deps": [],
"exports": [
"getSlug",
"createSlug"
]
},
"include": [
"speakingurl.min.js",
"README.md"
]
},
"volo": {
"url": "//cdnjs.cloudflare.com/ajax/libs/speakingurl/{version}/speakingurl.min.js"
},
"engines": {
"node": ">=0.8.0"
}
}
# Speaking URL [![NPM version](https://badge.fury.io/js/speakingurl.png)](http://badge.fury.io/js/speakingurl) [![Build Status](https://travis-ci.org/pid/speakingurl.png)](https://travis-ci.org/pid/speakingurl)
> Generate of so called "static" or "Clean URL" or "Pretty URL" or "nice-looking URL" or "Speaking URL" or "user-friendly URL" or "SEO-friendly URL" or "slug" from a string.
> Generate a slug with a lot of options; create of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' from a string.
This module aims to transliterate the input string.
This module aims to transliteration the input string.
For use in browser and server - no dependencies!

@@ -23,3 +22,2 @@

or
$ # http://component.io/

@@ -29,3 +27,2 @@ $ component install pid/speakingurl

or
$ # http://jamjs.org/

@@ -37,31 +34,40 @@ $ jam install speakingurl

or use the CDN from Cloudflare (available version overview: http://cdnjs.com/libraries/speakingurl/)
use //cdnjs.cloudflare.com/ajax/libs/speakingurl/0.6.3/speakingurl.min.js
or
use the CDN from Cloudflare
- available version overview: http://cdnjs.com/libraries/speakingurl/
- use //cdnjs.cloudflare.com/ajax/libs/speakingurl/0.7.0/speakingurl.min.js
## Usage
### getSlug(input, [options]);
```input```: {string} to convert; ```options```: {object|string} config object or separator string (see below)
* ```separator``` {string} default: '-'
* char that replace the whitespaces
* ```lang``` {string} default: 'en'
* language for symbol translation ('en, 'de', more coming soon)
* ```maintainCase``` {boolean} default: false
* true -> maintain case chars
* false -> convert all chars to lower case
* ```uric``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ",", "/"
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```uricNoSlash``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ","
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```mark``` {boolean} default: false
* true -> additionally allow chars: "-", "_", ".", "!", "~", "*", "'", "(", ")"
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```custom``` {object} default: {}
* custom map for translation, overwrites all i.e. { '&': '#', '*': ' star ' }
* ```truncate``` {number} default: 0
* 0 -> don't trim length
* &gt;= 1 -> trim to max length while not breaking any words
```input```: {string} to convert
```options``` {object|string} config object or separator string (see below)
* ```options``` {object}
* ```separator``` {string} default: '-'
* char that replace the whitespaces
* ```lang``` {string} default: 'en'
* language for symbol translation ('ar', 'de', 'en', 'es', 'fr', 'pt' and 'ru'; more coming soon, please help!)
* ```maintainCase``` {boolean} default: false
* true -> maintain case chars
* false -> convert all chars to lower case
* ```uric``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ",", "/"
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```uricNoSlash``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ","
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```mark``` {boolean} default: false
* true -> additionally allow chars: "-", "_", ".", "!", "~", "*", "'", "(", ")"
* false -> only Base64 chars allowed (/A-Za-z0-9-_/)
* ```custom``` {object} default: {}
* custom map for translation, overwrites all i.e. { '&': '#', '*': ' star ' }
* ```titleCase``` {boolean|array} default: false
* true -> convert input string to title-case
* array -> exclude words
* ```truncate``` {number} default: 0
* 0 -> don't trim length
* &gt;= 1 -> trim to max length while not breaking any words
* ```options``` {string} separator

@@ -81,27 +87,48 @@

slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {separator: '_'});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
separator: '_'
});
console.log(slug); // Output: schoener_titel_laesst_gruessen_bel_ete
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {uric: true});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
uric: true
});
console.log(slug); // Output: schoener-titel-laesst-gruessen?-bel-ete
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {uricNoSlash: true});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
uricNoSlash: true
});
console.log(slug); // Output: schoener-titel-laesst-gruessen?-bel-ete
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {mark: true});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
mark: true
});
console.log(slug); // Output: schoener-titel-laesst-gruessen!-bel-ete-!
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {truncate: 20});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
truncate: 20
});
console.log(slug); // Output: schoener-titel
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {maintainCase: true});
slug = getSlug("Schöner Titel läßt grüßen!? Bel été !", {
maintainCase: true
});
console.log(slug); // Output: Schoener-Titel-laesst-gruessen-Bel-ete
slug = getSlug("Äpfel & Birnen!", {lang: 'de'});
slug = getSlug("Äpfel & Birnen!", {
lang: 'de'
});
console.log(slug); // Output: aepfel-und-birnen
slug = getSlug("Apple & Pear!", {lang: 'en'}); // lang: "en" is default, just to clarify
slug = getSlug("Apple & Pear!", {
lang: 'en' // lang: "en" is default, just to clarify
});
console.log(slug); // Output: apple-and-pear
slug = getSlug('Foo & Bar * Baz', {custom: {'&': ' doo '}, uric:true } );
slug = getSlug('Foo & Bar * Baz', {
custom: {
'&': ' doo '
},
uric:true
});
console.log(slug); // Output: foo-doo-bar-baz

@@ -112,6 +139,16 @@

slug = getSlug('Foo & Bar | (Baz) * Doo', {custom:{'*': 'Boo'},mark:true});
slug = getSlug('Foo & Bar | (Baz) * Doo', {
custom: {
'*': 'Boo'
},
mark:true
});
console.log(slug); // Output: foo-and-bar-or-(baz)-boo-doo
slug = getSlug('Foo and Bar or Baz', {custom:{'and': 'und', 'or': ''}});
slug = getSlug('Foo and Bar or Baz', {
custom: {
'and': 'und',
'or': ''
}
});
console.log(slug); // Output: foo-und-bar-baz

@@ -122,4 +159,17 @@

slug = getSlug('NEXUS4 only €299', {maintainCase: true});
slug = getSlug('NEXUS4 only €299', {
maintainCase: true
});
console.log(slug); // Output: NEXUS-4-only-EUR299
slug = getSlug('Don\'t drink and drive', {
titleCase: true
});
console.log(slug); // Output: Don-t-Drink-And-Drive
slug = getSlug('Don\'t drink and drive', {
titleCase: ['and']
});
console.log(slug); // Output: Don-t-Drink-and-Drive
```

@@ -133,3 +183,5 @@

<script>
var slug = getSlug('NEXUS4 only €299', {maintainCase: true});
var slug = getSlug('NEXUS4 only €299', {
maintainCase: true
});
console.log(slug); // Output: NEXUS-4-only-EUR299

@@ -145,3 +197,3 @@ </script>

```javascript
var slug;
var options = {

@@ -153,6 +205,22 @@ maintainCase: true,

slug = mySlug("Schöner Titel läßt grüßen!? Bel été !");
var slug = mySlug("Schöner Titel läßt grüßen!? Bel été !");
console.log(slug); // Output: Schoener_Titel_laesst_gruessen_Bel_ete
```
Create your own specially configured function with title-case feature.
```javascript
var options = {
titleCase: [
"a","an","and","as","at","but",
"by","en","for","if","in","nor",
"of","on","or","per","the","to","vs"
]
};
var mySlug = require('speakingurl').createSlug(options);
var slug = mySlug('welcome to the jungle');
console.log(slug); // Output: Welcome-to-the-Jungle
```
In browser:

@@ -175,2 +243,4 @@

## [Changelog](https://raw.github.com/pid/speakingurl/master/Changelog.md)
## Tests

@@ -185,4 +255,2 @@ [![Build Status](https://travis-ci.org/pid/speakingurl.png)](https://travis-ci.org/pid/speakingurl)

## [History](https://raw.github.com/pid/speakingurl/master/History.md)
## References

@@ -189,0 +257,0 @@ - http://tools.ietf.org/html/rfc3986

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

/* speakingurl v0.6.3 (c) 2013 Sascha Droste http://pid.github.io/speakingurl/ */!function(){"use strict";var a=function(a,b){var f,g,h,i,j,k="object"==typeof b&&b.maintainCase||!1,l="object"==typeof b&&b.separator||"-",m="object"==typeof b&&b.truncate,n="object"==typeof b&&b.lang||"en",o="object"==typeof b&&b.uric||!1,p="object"==typeof b&&b.uricNoSlash||!1,q="object"==typeof b&&b.mark||!1,r=e[n]||e.en,s="object"==typeof b&&b.custom||{},t=[";","?",":","@","&","=","+","$",",","/"],u=[";","?",":","@","&","=","+","$",","],v=[".","!","~","*","'","(",")"],w="",x=l;if("string"!=typeof a)return"";for("string"==typeof b?l=b:"object"==typeof b&&(o&&(x+=t.join("")),p&&(x+=u.join("")),q&&(x+=v.join(""))),Object.keys(s).forEach(function(b){var d;d=b.length>1?new RegExp("\\b"+c(b)+"\\b","gi"):new RegExp(c(b),"gi"),a=a.replace(d,s[b])}),x=c(x),a=a.replace(/(^\s+|\s+$)/g,""),j=!1,g=0,i=a.length;i>g;g++)h=a[g],d[h]?(h=j&&d[h].match(/[A-Za-z0-9]/)?" "+d[h]:d[h],j=!1):!r[h]||o&&-1!==t.join("").indexOf(h)||p&&-1!==u.join("").indexOf(h)||q&&-1!==v.join("").indexOf(h)?(j&&(/[A-Za-z0-9]/.test(h)||w.substr(-1).match(/A-Za-z0-9]/))&&(h=" "+h),j=!1):(h=j||w.substr(-1).match(/[A-Za-z0-9]/)?l+r[h]:r[h],h+=void 0!==a[g+1]&&a[g+1].match(/[A-Za-z0-9]/)?l:"",j=!0),w+=h.replace(new RegExp("[^\\w\\s"+x+"_-]","g"),l);return w=w.replace(/\s+/g,l).replace(new RegExp("\\"+l+"+","g"),l).replace(new RegExp("(^\\"+l+"+|\\"+l+"+$)","g"),""),m&&w.length>m&&(f=w.charAt(m)===l,w=w.slice(0,m),f||(w=w.slice(0,w.lastIndexOf(l)))),k||(w=w.toLowerCase()),w},b=function(b){return function(c){return a(c,b)}},c=function(a){return a.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},d={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y",ẞ:"SS",α:"a",β:"b",γ:"g",δ:"d",ε:"e",ζ:"z",η:"h",θ:"8",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"3",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"w",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"h",ώ:"w",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"H",Θ:"8",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"3",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"W",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"H",Ώ:"W",Ϊ:"I",Ϋ:"Y",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY","元":"CNY","円":"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF"},e={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"}};if("undefined"!=typeof module&&module.exports)module.exports=a,module.exports.createSlug=b;else if("undefined"!=typeof define&&define.amd)define([],function(){return a});else try{if(window.getSlug||window.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";window.getSlug=a,window.createSlug=b}catch(f){}}();
/* speakingurl v0.7.0 (c) 2013 Sascha Droste http://pid.github.io/speakingurl/ */!function(){"use strict";var a=function(a,b){var f,g,h,i,j,k="object"==typeof b&&b.maintainCase||!1,l="object"==typeof b&&b.titleCase?b.titleCase:!1,m="object"==typeof b&&"object"==typeof b.custom&&b.custom?b.custom:{},n="object"==typeof b&&b.separator||"-",o="object"==typeof b&&b.truncate,p="object"==typeof b&&b.lang||"en",q="object"==typeof b&&b.uric||!1,r="object"==typeof b&&b.uricNoSlash||!1,s="object"==typeof b&&b.mark||!1,t=e[p]||e.en,u=[";","?",":","@","&","=","+","$",",","/"],v=[";","?",":","@","&","=","+","$",","],w=[".","!","~","*","'","(",")"],x="",y=n;if(l&&"number"==typeof l.length&&Array.prototype.toString.call(l)&&l.forEach(function(a){m[a+""]=a+""}),"string"!=typeof a)return"";for("string"==typeof b?n=b:"object"==typeof b&&(q&&(y+=u.join("")),r&&(y+=v.join("")),s&&(y+=w.join(""))),Object.keys(m).forEach(function(b){var d;d=b.length>1?new RegExp("\\b"+c(b)+"\\b","gi"):new RegExp(c(b),"gi"),a=a.replace(d,m[b])}),l&&(a=a.replace(/(\w)(\S*)/g,function(a,b,c){var d=b.toUpperCase()+(null!==c?c:"");return Object.keys(m).indexOf(d.toLowerCase())<0?d:d.toLowerCase()})),y=c(y),a=a.replace(/(^\s+|\s+$)/g,""),j=!1,g=0,i=a.length;i>g;g++)h=a[g],d[h]?(h=j&&d[h].match(/[A-Za-z0-9]/)?" "+d[h]:d[h],j=!1):!t[h]||q&&-1!==u.join("").indexOf(h)||r&&-1!==v.join("").indexOf(h)||s&&-1!==w.join("").indexOf(h)?(j&&(/[A-Za-z0-9]/.test(h)||x.substr(-1).match(/A-Za-z0-9]/))&&(h=" "+h),j=!1):(h=j||x.substr(-1).match(/[A-Za-z0-9]/)?n+t[h]:t[h],h+=void 0!==a[g+1]&&a[g+1].match(/[A-Za-z0-9]/)?n:"",j=!0),x+=h.replace(new RegExp("[^\\w\\s"+y+"_-]","g"),n);return x=x.replace(/\s+/g,n).replace(new RegExp("\\"+n+"+","g"),n).replace(new RegExp("(^\\"+n+"+|\\"+n+"+$)","g"),""),o&&x.length>o&&(f=x.charAt(o)===n,x=x.slice(0,o),f||(x=x.slice(0,x.lastIndexOf(n)))),k||l||l.length||(x=x.toLowerCase()),x},b=function(b){return function(c){return a(c,b)}},c=function(a){return a.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},d={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y",ẞ:"SS",α:"a",β:"b",γ:"g",δ:"d",ε:"e",ζ:"z",η:"h",θ:"8",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"3",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"w",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"h",ώ:"w",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"H",Θ:"8",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"3",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"W",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"H",Ώ:"W",Ϊ:"I",Ϋ:"Y",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY","元":"CNY","円":"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF"},e={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"}};if("undefined"!=typeof module&&module.exports)module.exports=a,module.exports.createSlug=b;else if("undefined"!=typeof define&&define.amd)define([],function(){return a});else try{if(window.getSlug||window.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";window.getSlug=a,window.createSlug=b}catch(f){}}();
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