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.12.5 to 0.13.1

4

bower.json
{
"name": "speakingurl",
"version": "0.12.5",
"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.13.1",
"description": "Generate a slug – transliteration with a lot of options",
"main": "speakingurl.min.js",

@@ -6,0 +6,0 @@ "homepage": "http://pid.github.io/speakingurl/",

@@ -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.12.5",
"version": "0.13.1",
"keywords": [

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

@@ -377,3 +377,3 @@ (function () {

'щ': 'sh',
'ъ': '',
'ъ': 'u',
'ы': 'y',

@@ -380,0 +380,0 @@ 'ь': '',

{
"name": "speakingurl",
"version": "0.12.5",
"version": "0.13.1",
"description": "Generate a slug – transliteration with a lot of options",

@@ -18,2 +18,3 @@ "homepage": "http://pid.github.io/speakingurl/",

"slug",
"slugify",
"speakingurl",

@@ -24,3 +25,2 @@ "transliteration",

"url",
"speaking url",
"nice url",

@@ -27,0 +27,0 @@ "static url",

@@ -1,13 +0,26 @@

# 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)
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) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/pid/speakingurl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
===============================================================================================================================================================================================================================================================================================================================================================
> 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.
> 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.
For use in browser and server - no dependencies!
###### Notes
Never use the slug to reference to the unique page in the database – if the title will change, you want to change the slug – you run into problems.
1. Use a unique reference to the record – e.g. a unique key "12345" => /my-little-title-12345.html
2. Store all historical slugs in the page record; but you have to re-calculate the slug from all pages – every time you update speakingurl
Redirect with 301 to the last/current slug.
##### NPM Badge
[![Module Status](https://nodei.co/npm/speakingurl.png?downloads=true&stars=true)](https://npmjs.org/package/speakingurl)
## Installation
Installation
------------
#### [npm](https://npmjs.org/package/onetime)
```shell

@@ -18,2 +31,3 @@ npm install speakingurl --save

#### [Bower](http://bower.io)
```shell

@@ -24,2 +38,3 @@ bower install --save speakingurl

#### [Component](https://github.com/component/component)
```shell

@@ -30,2 +45,3 @@ component install pid/speakingurl

#### [jamjs](http://jamjs.org/)
```shell

@@ -36,48 +52,55 @@ jam install speakingurl

#### [Download Package](https://github.com/pid/speakingurl/releases)
copy the file speakingurl.min.js to your script directory
#### [CDN/cloudflare](https://www.cloudflare.com/)
- available versions: http://cdnjs.com/libraries/speakingurl/
- use //cdnjs.cloudflare.com/ajax/libs/speakingurl/0.12.5/speakingurl.min.js
- use //cdnjs.cloudflare.com/ajax/libs/speakingurl/0.13.1/speakingurl.min.js
#### [CDN/maxcdn](https://www.maxcdn.com/)
- available versions: http://www.jsdelivr.com/#!speakingurl
- use //cdn.jsdelivr.net/speakingurl/0.12.5/speakingurl.min.js
- use //cdn.jsdelivr.net/speakingurl/0.13.1/speakingurl.min.js
## Usage
Usage
-----
### getSlug(input, [options]);
```input```: {string} to convert
```options``` {object|string} config object or separator string (see below)
`input`: {string} to convert
* ```options``` {object}
* ```separator``` {string} default: '-'
* char that replace the whitespaces
* ```lang``` {string} default: 'en'
* language for symbol translation ('ar', 'cz', 'de', 'en', 'es', 'fr', 'nl', pt', 'ru', 'sk' and 'vn'; more coming soon, please help!)
* false -> don't convert symbols
* ```maintainCase``` {boolean} default: false
* true -> maintain case chars
* false -> convert all chars to lower case
* ```titleCase``` {boolean|array} default: false
* true -> convert input string to title-case
* array -> exclude words
* ```truncate``` {number} default: 0
* 0 -> don't trim length
* >= 1 -> trim to max length while not breaking any words
* ```uric``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ",", "/"
* false
* ```uricNoSlash``` {boolean} default: false
* true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ","
* ```mark``` {boolean} default: false
* true -> additionally allow chars: "-", "_", ".", "!", "~", "*", "'", "(", ")"
* ```custom``` {object} default: {}
* custom map for translation, overwrites all i.e. { '&': '#', '*': ' star ' }
`options` {object|string} config object or separator string (see below)
* ```options``` {string} separator
- `options` {object}
notes: default only Base64 chars are allowed (/A-Za-z0-9_-/), setting ```uric```, ```uricNoSlash``` or/and ```mark``` to ```true``` will add the specified chars to the list of allowed characters. The separator-character is always allowed.
- `separator` {string} default: '-'
- char that replace the whitespaces
- `lang` {string} default: 'en'
- language for symbol translation ('ar', 'cz', 'de', 'en', 'es', 'fr', 'nl', pt', 'ru', 'sk' and 'vn'; more coming soon, please help!)
- false -> don't convert symbols
- `maintainCase` {boolean} default: false
- true -> maintain case chars
- false -> convert all chars to lower case
- `titleCase` {boolean|array} default: false
- true -> convert input string to title-case
- array -> exclude words
- `truncate` {number} default: 0
- 0 -> don't trim length
- >= 1 -> trim to max length while not breaking any words
- `uric` {boolean} default: false
- true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ",", "/"
- false
- `uricNoSlash` {boolean} default: false
- true -> additionally allow chars: ";", "?", ":", "@", "&", "=", "+", "$", ","
- `mark` {boolean} default: false
- true -> additionally allow chars: "-", "_", ".", "!", "~", "*", "'", "(", ")"
- `custom` {object} default: {}
- custom map for translation, overwrites all i.e. { '&': '#', '*': ' star ' }
- `options` {string} separator
notes: default only Base64 chars are allowed (/A-Za-z0-9_-/), setting `uric`, `uricNoSlash` or/and `mark` to `true` will add the specified chars to the list of allowed characters. The separator-character is always allowed.
##### Node.js
```js

@@ -88,2 +111,3 @@ var getSlug = require('speakingurl');

##### Browser
```html

@@ -94,2 +118,3 @@ <script src="bower_components/speakingurl/speakingurl.min.js"></script>

#### Examples
```js

@@ -196,4 +221,5 @@ var slug;

### createSlug([options])
```options```: {object|string} config object or separator string (see above)
`options`: {object|string} config object or separator string (see above)
Create your own specially configured function.

@@ -232,6 +258,10 @@

## Changelog
Changelog
---------
see [CHANGELOG.md](https://raw.github.com/pid/speakingurl/master/CHANGELOG.md)
## Tests
Tests
-----
[![Build Status](https://travis-ci.org/pid/speakingurl.png)](https://travis-ci.org/pid/speakingurl)

@@ -243,3 +273,4 @@

## Contribution
Contribution
------------

@@ -264,9 +295,22 @@ ```shell

Release
-------
```shell
$ gulp bumpup --patch
$ gulp
$ gulp release
```
[![Flattr](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/1418477/pidspeakingurl-on-GitHub)
## References
References
----------
- http://tools.ietf.org/html/rfc3986
- http://en.wikipedia.org/wiki/Transliteration
## Credits
Credits
-------
- [@dypsilon](https://github.com/dypsilon/)

@@ -276,15 +320,15 @@ - [@simov](https://github.com/simov/)

## [License](https://raw.github.com/pid/speakingurl/master/LICENSE)
[License](https://raw.github.com/pid/speakingurl/master/LICENSE)
----------------------------------------------------------------
The BSD 3-Clause License (BSD3)
Copyright (c) 2013-2014 Sascha Droste <pid@posteo.net>
All rights reserved.
Copyright (c) 2013-2014 Sascha Droste pid@posteo.net All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/**
* speakingurl
* @version v0.12.5
* @version v0.13.1
* @link http://pid.github.io/speakingurl/
* @license BSD
* @author Sascha Droste
*/!function(){"use strict";var e=function(e,a){var l,r,u,s,c,f="object"==typeof a&&a.maintainCase||!1,g="object"==typeof a&&a.titleCase?a.titleCase:!1,d="object"==typeof a&&"object"==typeof a.custom&&a.custom?a.custom:{},m="object"==typeof a&&a.separator||"-",h="object"==typeof a&&+a.truncate>1&&a.truncate||!1,p="object"==typeof a&&a.uric||!1,y="object"==typeof a&&a.uricNoSlash||!1,A="object"==typeof a&&a.mark||!1,j="object"==typeof a&&a.lang&&i[a.lang]?i[a.lang]:"object"!=typeof a||a.lang!==!1&&a.lang!==!0?i.en:{},b="object"==typeof a&&a.lang&&t[a.lang]?t[a.lang]:"object"!=typeof a||a.lang!==!1&&a.lang!==!0?t.en:{},E=[";","?",":","@","&","=","+","$",",","/"],O=[";","?",":","@","&","=","+","$",","],S=[".","!","~","*","'","(",")"],k="",w=m;if(g&&"number"==typeof g.length&&Array.prototype.toString.call(g)&&g.forEach(function(e){d[e+""]=e+""}),"string"!=typeof e)return"";for("string"==typeof a?m=a:"object"==typeof a&&(p&&(w+=E.join("")),y&&(w+=O.join("")),A&&(w+=S.join(""))),Object.keys(d).forEach(function(a){var n;n=a.length>1?new RegExp("\\b"+o(a)+"\\b","gi"):new RegExp(o(a),"gi"),e=e.replace(n,d[a])}),g&&(e=e.replace(/(\w)(\S*)/g,function(e,a,o){var n=a.toUpperCase()+(null!==o?o:"");return Object.keys(d).indexOf(n.toLowerCase())<0?n:n.toLowerCase()})),w=o(w),e=e.replace(/(^\s+|\s+$)/g,""),c=!1,r=0,s=e.length;s>r;r++)u=e[r],b[u]?(u=c&&b[u].match(/[A-Za-z0-9]/)?" "+b[u]:b[u],c=!1):n[u]?(u=c&&n[u].match(/[A-Za-z0-9]/)?" "+n[u]:n[u],c=!1):!j[u]||p&&-1!==E.join("").indexOf(u)||y&&-1!==O.join("").indexOf(u)||A&&-1!==S.join("").indexOf(u)?(c&&(/[A-Za-z0-9]/.test(u)||k.substr(-1).match(/A-Za-z0-9]/))&&(u=" "+u),c=!1):(u=c||k.substr(-1).match(/[A-Za-z0-9]/)?m+j[u]:j[u],u+=void 0!==e[r+1]&&e[r+1].match(/[A-Za-z0-9]/)?m:"",c=!0),k+=u.replace(new RegExp("[^\\w\\s"+w+"_-]","g"),m);return k=k.replace(/\s+/g,m).replace(new RegExp("\\"+m+"+","g"),m).replace(new RegExp("(^\\"+m+"+|\\"+m+"+$)","g"),""),h&&k.length>h&&(l=k.charAt(h)===m,k=k.slice(0,h),l||(k=k.slice(0,k.lastIndexOf(m)))),f||g||g.length||(k=k.toLowerCase()),k},a=function(a){return function(o){return e(o,a)}},o=function(e){return e.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},n={"À":"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","β":"v","γ":"g","δ":"d","ε":"e","ζ":"z","η":"i","θ":"th","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"ks","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"o","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"i","ώ":"o","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"I","Θ":"TH","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"KS","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"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","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ą":"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","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ế":"e","Ế":"E","ề":"e","Ề":"E","ệ":"e","Ệ":"E","ễ":"e","Ễ":"E","ọ":"o","Ọ":"o","ố":"o","Ố":"O","ồ":"o","Ồ":"O","ộ":"o","Ộ":"O","ỗ":"o","Ỗ":"O","ơ":"o","Ơ":"O","ớ":"o","Ớ":"O","ờ":"o","Ờ":"O","ợ":"o","Ợ":"O","ỡ":"o","Ỡ":"O","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ă":"a","Ă":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A"},t={en:{},sk:{"ä":"a","Ä":"A"}},i={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"},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},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"},cz:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mene jako",">":"vice jako","∑":"soucet","¤":"mena"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}};if("undefined"!=typeof module&&module.exports)module.exports=e,module.exports.createSlug=a;else if("undefined"!=typeof define&&define.amd)define([],function(){return e});else try{if(window.getSlug||window.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";window.getSlug=e,window.createSlug=a}catch(l){}}();
*/!function(){"use strict";var e=function(e,a){var l,r,u,s,c,f="object"==typeof a&&a.maintainCase||!1,g="object"==typeof a&&a.titleCase?a.titleCase:!1,d="object"==typeof a&&"object"==typeof a.custom&&a.custom?a.custom:{},m="object"==typeof a&&a.separator||"-",h="object"==typeof a&&+a.truncate>1&&a.truncate||!1,p="object"==typeof a&&a.uric||!1,y="object"==typeof a&&a.uricNoSlash||!1,A="object"==typeof a&&a.mark||!1,j="object"==typeof a&&a.lang&&i[a.lang]?i[a.lang]:"object"!=typeof a||a.lang!==!1&&a.lang!==!0?i.en:{},b="object"==typeof a&&a.lang&&t[a.lang]?t[a.lang]:"object"!=typeof a||a.lang!==!1&&a.lang!==!0?t.en:{},E=[";","?",":","@","&","=","+","$",",","/"],O=[";","?",":","@","&","=","+","$",","],S=[".","!","~","*","'","(",")"],k="",w=m;if(g&&"number"==typeof g.length&&Array.prototype.toString.call(g)&&g.forEach(function(e){d[e+""]=e+""}),"string"!=typeof e)return"";for("string"==typeof a?m=a:"object"==typeof a&&(p&&(w+=E.join("")),y&&(w+=O.join("")),A&&(w+=S.join(""))),Object.keys(d).forEach(function(a){var n;n=a.length>1?new RegExp("\\b"+o(a)+"\\b","gi"):new RegExp(o(a),"gi"),e=e.replace(n,d[a])}),g&&(e=e.replace(/(\w)(\S*)/g,function(e,a,o){var n=a.toUpperCase()+(null!==o?o:"");return Object.keys(d).indexOf(n.toLowerCase())<0?n:n.toLowerCase()})),w=o(w),e=e.replace(/(^\s+|\s+$)/g,""),c=!1,r=0,s=e.length;s>r;r++)u=e[r],b[u]?(u=c&&b[u].match(/[A-Za-z0-9]/)?" "+b[u]:b[u],c=!1):n[u]?(u=c&&n[u].match(/[A-Za-z0-9]/)?" "+n[u]:n[u],c=!1):!j[u]||p&&-1!==E.join("").indexOf(u)||y&&-1!==O.join("").indexOf(u)||A&&-1!==S.join("").indexOf(u)?(c&&(/[A-Za-z0-9]/.test(u)||k.substr(-1).match(/A-Za-z0-9]/))&&(u=" "+u),c=!1):(u=c||k.substr(-1).match(/[A-Za-z0-9]/)?m+j[u]:j[u],u+=void 0!==e[r+1]&&e[r+1].match(/[A-Za-z0-9]/)?m:"",c=!0),k+=u.replace(new RegExp("[^\\w\\s"+w+"_-]","g"),m);return k=k.replace(/\s+/g,m).replace(new RegExp("\\"+m+"+","g"),m).replace(new RegExp("(^\\"+m+"+|\\"+m+"+$)","g"),""),h&&k.length>h&&(l=k.charAt(h)===m,k=k.slice(0,h),l||(k=k.slice(0,k.lastIndexOf(m)))),f||g||g.length||(k=k.toLowerCase()),k},a=function(a){return function(o){return e(o,a)}},o=function(e){return e.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},n={"À":"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","β":"v","γ":"g","δ":"d","ε":"e","ζ":"z","η":"i","θ":"th","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"ks","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"o","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"i","ώ":"o","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"I","Θ":"TH","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"KS","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"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","ъ":"u","ы":"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","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ą":"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","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ế":"e","Ế":"E","ề":"e","Ề":"E","ệ":"e","Ệ":"E","ễ":"e","Ễ":"E","ọ":"o","Ọ":"o","ố":"o","Ố":"O","ồ":"o","Ồ":"O","ộ":"o","Ộ":"O","ỗ":"o","Ỗ":"O","ơ":"o","Ơ":"O","ớ":"o","Ớ":"O","ờ":"o","Ờ":"O","ợ":"o","Ợ":"O","ỡ":"o","Ỡ":"O","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ă":"a","Ă":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A"},t={en:{},sk:{"ä":"a","Ä":"A"}},i={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"},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},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"},cz:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mene jako",">":"vice jako","∑":"soucet","¤":"mena"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}};if("undefined"!=typeof module&&module.exports)module.exports=e,module.exports.createSlug=a;else if("undefined"!=typeof define&&define.amd)define([],function(){return e});else try{if(window.getSlug||window.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";window.getSlug=e,window.createSlug=a}catch(l){}}();
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