speakingurl
Advanced tools
Comparing version 0.12.3 to 0.12.4
{ | ||
"name": "speakingurl", | ||
"version": "0.12.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.4", | ||
"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.3", | ||
"version": "0.12.4", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "slug", |
@@ -377,3 +377,3 @@ (function () { | ||
'щ': 'sh', | ||
'ъ': '', | ||
'ъ': 'u', | ||
'ы': 'y', | ||
@@ -380,0 +380,0 @@ 'ь': '', |
{ | ||
"name": "speakingurl", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"description": "Generate a slug – transliteration with a lot of options", | ||
@@ -5,0 +5,0 @@ "homepage": "http://pid.github.io/speakingurl/", |
118
README.md
@@ -1,5 +0,5 @@ | ||
# 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. | ||
@@ -10,5 +10,7 @@ For use in browser and server - no dependencies! | ||
## Installation | ||
Installation | ||
------------ | ||
#### [npm](https://npmjs.org/package/onetime) | ||
```shell | ||
@@ -19,2 +21,3 @@ npm install speakingurl --save | ||
#### [Bower](http://bower.io) | ||
```shell | ||
@@ -25,2 +28,3 @@ bower install --save speakingurl | ||
#### [Component](https://github.com/component/component) | ||
```shell | ||
@@ -31,2 +35,3 @@ component install pid/speakingurl | ||
#### [jamjs](http://jamjs.org/) | ||
```shell | ||
@@ -37,48 +42,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.3/speakingurl.min.js | ||
- use //cdnjs.cloudflare.com/ajax/libs/speakingurl/0.12.4/speakingurl.min.js | ||
#### [CDN/maxcdn](https://www.maxcdn.com/) | ||
- available versions: http://www.jsdelivr.com/#!speakingurl | ||
- use //cdn.jsdelivr.net/speakingurl/0.12.3/speakingurl.min.js | ||
- use //cdn.jsdelivr.net/speakingurl/0.12.4/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 | ||
@@ -89,2 +101,3 @@ var getSlug = require('speakingurl'); | ||
##### Browser | ||
```html | ||
@@ -95,2 +108,3 @@ <script src="bower_components/speakingurl/speakingurl.min.js"></script> | ||
#### Examples | ||
```js | ||
@@ -197,4 +211,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. | ||
@@ -233,6 +248,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) | ||
@@ -244,3 +263,4 @@ | ||
## Contribution | ||
Contribution | ||
------------ | ||
@@ -267,7 +287,11 @@ ```shell | ||
## References | ||
References | ||
---------- | ||
- http://tools.ietf.org/html/rfc3986 | ||
- http://en.wikipedia.org/wiki/Transliteration | ||
## Credits | ||
Credits | ||
------- | ||
- [@dypsilon](https://github.com/dypsilon/) | ||
@@ -277,15 +301,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.3 | ||
* @version v0.12.4 | ||
* @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){}}(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
304
0
0
43563
10
1
843
1