diff --git a/.editorconfig b/.editorconfig index e9a9bff..5d12634 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ root = true [*] indent_style = space -indent_size = 4 +indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/Gulpfile.js b/Gulpfile.js index 1d509f3..79c1f4c 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -6,7 +6,7 @@ var argv = require('minimist')(process.argv.slice(2)); var path = { rootdir: './', - lib: ['./lib/**/*.js'], + lib: ['./lib/**/*.js', '!./lib/**/*.js.map'], libdir: './lib/', test: ['./test/**/*.js'], testdir: './test/', diff --git a/component.json b/component.json index 3ab60bc..ea950ed 100644 --- a/component.json +++ b/component.json @@ -1,21 +1,21 @@ { - "name": "speakingurl", - "repo": "pid/speakingurl", - "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": "14.0.1", - "keywords": [ - "slug", - "seo", - "url", - "speakingurl", - "nice url", - "static url" - ], - "dependencies": {}, - "development": {}, - "license": "BSD", - "main": "speakingurl.min.js", - "scripts": [ - "speakingurl.min.js" - ] + "name": "speakingurl", + "repo": "pid/speakingurl", + "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": "14.0.1", + "keywords": [ + "slug", + "seo", + "url", + "speakingurl", + "nice url", + "static url" + ], + "dependencies": {}, + "development": {}, + "license": "BSD", + "main": "speakingurl.min.js", + "scripts": [ + "speakingurl.min.js" + ] } \ No newline at end of file diff --git a/lib/speakingurl.js b/lib/speakingurl.js index 4a62bc0..b475d15 100644 --- a/lib/speakingurl.js +++ b/lib/speakingurl.js @@ -1,12 +1,17 @@ -(function (root) { - 'use strict'; - +(function (factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } else if (typeof define === 'function' && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; /** * charMap * @type {Object} */ - var charMap = { - + exports.charMap = { // latin 'À': 'A', 'Á': 'A', @@ -75,9 +80,7 @@ 'þ': 'th', 'ÿ': 'y', 'ẞ': 'SS', - // language specific - // Arabic 'ا': 'a', 'أ': 'a', @@ -119,7 +122,6 @@ 'ﻷ': 'laa', 'ﻹ': 'lai', 'ﻵ': 'laa', - // Persian additional characters than Arabic 'گ': 'g', 'چ': 'ch', @@ -127,7 +129,6 @@ 'ژ': 'zh', 'ک': 'k', 'ی': 'y', - // Arabic diactrics 'َ': 'a', 'ً': 'an', @@ -136,7 +137,6 @@ 'ُ': 'u', 'ٌ': 'on', 'ْ': '', - // Arabic numbers '٠': '0', '١': '1', @@ -148,7 +148,6 @@ '٧': '7', '٨': '8', '٩': '9', - // Persian numbers '۰': '0', '۱': '1', @@ -160,7 +159,6 @@ '۷': '7', '۸': '8', '۹': '9', - // Burmese consonants 'က': 'k', 'ခ': 'kh', @@ -227,7 +225,6 @@ '္': '', '့': '', 'း': '', - // Czech 'č': 'c', 'ď': 'd', @@ -247,7 +244,6 @@ 'Ť': 'T', 'Ů': 'U', 'Ž': 'Z', - // Dhivehi 'ހ': 'h', 'ށ': 'sh', @@ -298,7 +294,6 @@ 'ޮ': 'o', 'ޯ': 'oa', 'ް': '', - // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian // National system (2002) 'ა': 'a', @@ -334,7 +329,6 @@ 'ხ': 'kh', 'ჯ': 'j', 'ჰ': 'h', - // Greek 'α': 'a', 'β': 'v', @@ -405,7 +399,6 @@ 'Ώ': 'O', 'Ϊ': 'I', 'Ϋ': 'Y', - // Latvian 'ā': 'a', // 'č': 'c', // duplicate @@ -429,7 +422,6 @@ // 'Š': 'S', // duplicate 'Ū': 'U', // 'Ž': 'Z', // duplicate - // Macedonian 'Ќ': 'Kj', 'ќ': 'kj', @@ -439,7 +431,6 @@ 'њ': 'nj', 'Тс': 'Ts', 'тс': 'ts', - // Polish 'ą': 'a', 'ć': 'c', @@ -458,7 +449,6 @@ 'Ś': 'S', 'Ź': 'Z', 'Ż': 'Z', - // Ukranian 'Є': 'Ye', 'І': 'I', @@ -468,7 +458,6 @@ 'і': 'i', 'ї': 'yi', 'ґ': 'g', - // Romanian 'ă': 'a', 'Ă': 'A', @@ -480,10 +469,8 @@ 'Ț': 'T', 'ţ': 't', 'Ţ': 'T', - // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian // ICAO - 'а': 'a', 'б': 'b', 'в': 'v', @@ -550,7 +537,6 @@ 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya', - // Serbian 'ђ': 'dj', 'ј': 'j', @@ -564,7 +550,6 @@ // 'Њ': 'Nj', // duplicate 'Ћ': 'C', 'Џ': 'Dz', - // Slovak 'ľ': 'l', 'ĺ': 'l', @@ -572,7 +557,6 @@ 'Ľ': 'L', 'Ĺ': 'L', 'Ŕ': 'R', - // Turkish 'ş': 's', 'Ş': 'S', @@ -586,7 +570,6 @@ // 'Ö': 'O', // duplicate, see langCharMap 'ğ': 'g', 'Ğ': 'G', - // Vietnamese 'ả': 'a', 'Ả': 'A', @@ -710,7 +693,6 @@ "⑱": "18", "⑲": "18", "⑳": "18", - "⓵": "1", "⓶": "2", "⓷": "3", @@ -721,7 +703,6 @@ "⓼": "8", "⓽": "9", "⓾": "10", - "⓿": "0", "⓫": "11", "⓬": "12", @@ -733,7 +714,6 @@ "⓲": "18", "⓳": "19", "⓴": "20", - "Ⓐ": "A", "Ⓑ": "B", "Ⓒ": "C", @@ -760,7 +740,6 @@ "Ⓧ": "X", "Ⓨ": "Y", "Ⓩ": "Z", - "ⓐ": "a", "ⓑ": "b", "ⓒ": "c", @@ -787,7 +766,6 @@ "ⓧ": "x", "ⓨ": "y", "ⓩ": "z", - // symbols '“': '"', '”': '"', @@ -809,7 +787,6 @@ '•': '*', '၊': ',', '။': '.', - // currency '$': 'USD', '€': 'EUR', @@ -851,27 +828,23 @@ 'zł': 'PLN', '₽': 'RUB', '₾': 'GEL' - }; - /** * special look ahead character array * These characters form with consonants to become 'single'/consonant combo * @type [Array] */ - var lookAheadCharArray = [ + exports.lookAheadCharArray = [ // burmese '်', - // Dhivehi 'ް' ]; - /** * diatricMap for languages where transliteration changes entirely as more diatrics are added * @type {Object} */ - var diatricMap = { + exports.diatricMap = { // Burmese // dependent vowels 'ာ': 'a', @@ -888,7 +861,7 @@ 'ော်': 'aw', 'ေါ': 'aw', 'ေါ်': 'aw', - '်': '်', // this is special case but the character will be converted to latin in the code + '်': '်', 'က်': 'et', 'ိုက်': 'aik', 'ောက်': 'auk', @@ -925,20 +898,17 @@ 'ံ': 'an', 'ိံ': 'ein', 'ုံ': 'on', - // Dhivehi 'ައް': 'ah', 'ަށް': 'ah' }; - /** * langCharMap language specific characters translations * @type {Object} */ - var langCharMap = { - 'en': {}, // default language - - 'az': { // Azerbaijani + exports.langCharMap = { + 'en': {}, + 'az': { 'ç': 'c', 'ə': 'e', 'ğ': 'g', @@ -954,8 +924,7 @@ 'Ş': 'S', 'Ü': 'U' }, - - 'cs': { // Czech + 'cs': { 'č': 'c', 'ď': 'd', 'ě': 'e', @@ -975,23 +944,21 @@ 'Ů': 'U', 'Ž': 'Z' }, - - 'fi': { // Finnish + 'fi': { // 'å': 'a', duplicate see charMap/latin // 'Å': 'A', duplicate see charMap/latin - 'ä': 'a', // ok - 'Ä': 'A', // ok - 'ö': 'o', // ok + 'ä': 'a', + 'Ä': 'A', + 'ö': 'o', 'Ö': 'O' // ok }, - - 'hu': { // Hungarian - 'ä': 'a', // ok - 'Ä': 'A', // ok + 'hu': { + 'ä': 'a', + 'Ä': 'A', // 'á': 'a', duplicate see charMap/latin // 'Á': 'A', duplicate see charMap/latin - 'ö': 'o', // ok - 'Ö': 'O', // ok + 'ö': 'o', + 'Ö': 'O', // 'ő': 'o', duplicate see charMap/latin // 'Ő': 'O', duplicate see charMap/latin 'ü': 'u', @@ -999,8 +966,7 @@ 'ű': 'u', 'Ű': 'U' }, - - 'lt': { // Lithuanian + 'lt': { 'ą': 'a', 'č': 'c', 'ę': 'e', @@ -1019,8 +985,7 @@ 'Ų': 'U', 'Ū': 'U' }, - - 'lv': { // Latvian + 'lv': { 'ā': 'a', 'č': 'c', 'ē': 'e', @@ -1044,8 +1009,7 @@ 'Ū': 'u', 'Ž': 'Z' }, - - 'pl': { // Polish + 'pl': { 'ą': 'a', 'ć': 'c', 'ę': 'e', @@ -1065,22 +1029,19 @@ 'Ź': 'Z', 'Ż': 'Z' }, - - 'sv': { // Swedish + 'sv': { // 'å': 'a', duplicate see charMap/latin // 'Å': 'A', duplicate see charMap/latin - 'ä': 'a', // ok - 'Ä': 'A', // ok - 'ö': 'o', // ok + 'ä': 'a', + 'Ä': 'A', + 'ö': 'o', 'Ö': 'O' // ok }, - - 'sk': { // Slovak + 'sk': { 'ä': 'a', 'Ä': 'A' }, - - 'sr': { // Serbian + 'sr': { 'љ': 'lj', 'њ': 'nj', 'Љ': 'Lj', @@ -1088,21 +1049,19 @@ 'đ': 'dj', 'Đ': 'Dj' }, - - 'tr': { // Turkish + 'tr': { 'Ü': 'U', 'Ö': 'O', 'ü': 'u', 'ö': 'o' } }; - /** * symbolMap language specific symbol translations * translations must be transliterated already * @type {Object} */ - var symbolMap = { + exports.symbolMap = { 'ar': { '∆': 'delta', '∞': 'la-nihaya', @@ -1114,9 +1073,7 @@ '∑': 'majmou', '¤': 'omla' }, - 'az': {}, - 'ca': { '∆': 'delta', '∞': 'infinit', @@ -1128,7 +1085,6 @@ '∑': 'suma dels', '¤': 'moneda' }, - 'cs': { '∆': 'delta', '∞': 'nekonecno', @@ -1140,7 +1096,6 @@ '∑': 'soucet', '¤': 'mena' }, - 'de': { '∆': 'delta', '∞': 'unendlich', @@ -1152,7 +1107,6 @@ '∑': 'Summe von', '¤': 'Waehrung' }, - 'dv': { '∆': 'delta', '∞': 'kolunulaa', @@ -1164,7 +1118,6 @@ '∑': 'jumula', '¤': 'faisaa' }, - 'en': { '∆': 'delta', '∞': 'infinity', @@ -1176,7 +1129,6 @@ '∑': 'sum', '¤': 'currency' }, - 'es': { '∆': 'delta', '∞': 'infinito', @@ -1188,7 +1140,6 @@ '∑': 'suma de los', '¤': 'moneda' }, - 'fa': { '∆': 'delta', '∞': 'bi-nahayat', @@ -1200,7 +1151,6 @@ '∑': 'majmooe', '¤': 'vahed' }, - 'fi': { '∆': 'delta', '∞': 'aarettomyys', @@ -1212,7 +1162,6 @@ '∑': 'summa', '¤': 'valuutta' }, - 'fr': { '∆': 'delta', '∞': 'infiniment', @@ -1224,7 +1173,6 @@ '∑': 'somme des', '¤': 'monnaie' }, - 'ge': { '∆': 'delta', '∞': 'usasruloba', @@ -1236,9 +1184,7 @@ '∑': 'jami', '¤': 'valuta' }, - 'gr': {}, - 'hu': { '∆': 'delta', '∞': 'vegtelen', @@ -1250,7 +1196,6 @@ '∑': 'szumma', '¤': 'penznem' }, - 'it': { '∆': 'delta', '∞': 'infinito', @@ -1262,7 +1207,6 @@ '∑': 'somma', '¤': 'moneta' }, - 'lt': { '∆': 'delta', '∞': 'begalybe', @@ -1274,7 +1218,6 @@ '∑': 'suma', '¤': 'valiuta' }, - 'lv': { '∆': 'delta', '∞': 'bezgaliba', @@ -1286,7 +1229,6 @@ '∑': 'summa', '¤': 'valuta' }, - 'my': { '∆': 'kwahkhyaet', '∞': 'asaonasme', @@ -1298,9 +1240,7 @@ '∑': 'paungld', '¤': 'ngwekye' }, - 'mk': {}, - 'nl': { '∆': 'delta', '∞': 'oneindig', @@ -1312,7 +1252,6 @@ '∑': 'som', '¤': 'valuta' }, - 'pl': { '∆': 'delta', '∞': 'nieskonczonosc', @@ -1324,7 +1263,6 @@ '∑': 'suma', '¤': 'waluta' }, - 'pt': { '∆': 'delta', '∞': 'infinito', @@ -1336,7 +1274,6 @@ '∑': 'soma', '¤': 'moeda' }, - 'ro': { '∆': 'delta', '∞': 'infinit', @@ -1348,7 +1285,6 @@ '∑': 'suma', '¤': 'valuta' }, - 'ru': { '∆': 'delta', '∞': 'beskonechno', @@ -1360,7 +1296,6 @@ '∑': 'summa', '¤': 'valjuta' }, - 'sk': { '∆': 'delta', '∞': 'nekonecno', @@ -1372,9 +1307,7 @@ '∑': 'sucet', '¤': 'mena' }, - 'sr': {}, - 'tr': { '∆': 'delta', '∞': 'sonsuzluk', @@ -1386,7 +1319,6 @@ '∑': 'toplam', '¤': 'para birimi' }, - 'uk': { '∆': 'delta', '∞': 'bezkinechnist', @@ -1398,7 +1330,6 @@ '∑': 'suma', '¤': 'valjuta' }, - 'vn': { '∆': 'delta', '∞': 'vo cuc', @@ -1411,13 +1342,9 @@ '¤': 'tien te' } }; - - var uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join(''); - - var uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join(''); - - var markChars = ['.', '!', '~', '*', "'", '(', ')'].join(''); - + exports.uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join(''); + exports.uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join(''); + exports.markChars = ['.', '!', '~', '*', "'", '(', ')'].join(''); /** * getSlug * @param {string} input input string @@ -1425,7 +1352,7 @@ * @api public * @return {string} sluggified string */ - var getSlug = function getSlug(input, opts) { + exports.getSlug = function (input, opts) { var separator = '-'; var result = ''; var diatricString = ''; @@ -1446,19 +1373,16 @@ var lastCharWasSymbol; var lastCharWasDiatric; var allowedChars = ''; - if (typeof input !== 'string') { return ''; } - if (typeof opts === 'string') { separator = opts; } - - symbol = symbolMap.en; - langChar = langCharMap.en; - + symbol = exports.symbolMap.en; + langChar = exports.langCharMap.en; if (typeof opts === 'object') { + opts = opts; maintainCase = opts.maintainCase || false; customReplacements = (opts.custom && typeof opts.custom === 'object') ? opts.custom : customReplacements; truncate = (+opts.truncate > 1 && opts.truncate) || false; @@ -1467,121 +1391,101 @@ markFlag = opts.mark || false; convertSymbols = (opts.symbols === false || opts.lang === false) ? false : true; separator = opts.separator || separator; - if (uricFlag) { - allowedChars += uricChars; + allowedChars += exports.uricChars; } - if (uricNoSlashFlag) { - allowedChars += uricNoSlashChars; + allowedChars += exports.uricNoSlashChars; } - if (markFlag) { - allowedChars += markChars; + allowedChars += exports.markChars; } - - symbol = (opts.lang && symbolMap[opts.lang] && convertSymbols) ? - symbolMap[opts.lang] : (convertSymbols ? symbolMap.en : {}); - - langChar = (opts.lang && langCharMap[opts.lang]) ? - langCharMap[opts.lang] : - opts.lang === false || opts.lang === true ? {} : langCharMap.en; - + symbol = (opts.lang && exports.symbolMap[opts.lang] && convertSymbols) ? + exports.symbolMap[opts.lang] : (convertSymbols ? exports.symbolMap.en : {}); + langChar = (opts.lang && exports.langCharMap[opts.lang]) ? + exports.langCharMap[opts.lang] : + opts.lang === false || opts.lang === true ? {} : exports.langCharMap.en; // if titleCase config is an Array, rewrite to object format - if (opts.titleCase && typeof opts.titleCase.length === 'number' && Array.prototype.toString.call(opts.titleCase)) { + if (opts.titleCase && Array.isArray(opts.titleCase) && typeof opts.titleCase.length === 'number' && Array.prototype.toString.call(opts.titleCase)) { + opts.titleCase = opts.titleCase; opts.titleCase.forEach(function (v) { customReplacements[v + ''] = v + ''; }); - titleCase = true; } else { titleCase = !!opts.titleCase; } - // if custom config is an Array, rewrite to object format - if (opts.custom && typeof opts.custom.length === 'number' && Array.prototype.toString.call(opts.custom)) { + if (opts.custom && Array.isArray(opts.custom) && typeof opts.custom.length === 'number' && Array.prototype.toString.call(opts.custom)) { + opts.custom = opts.custom; opts.custom.forEach(function (v) { customReplacements[v + ''] = v + ''; }); } - // custom replacements Object.keys(customReplacements).forEach(function (v) { var r; - if (v.length > 1) { - r = new RegExp('\\b' + escapeChars(v) + '\\b', 'gi'); + r = new RegExp('\\b' + exports.escapeChars(v) + '\\b', 'gi'); } else { - r = new RegExp(escapeChars(v), 'gi'); + r = new RegExp(exports.escapeChars(v), 'gi'); } - input = input.replace(r, customReplacements[v]); }); - // add all custom replacement to allowed charlist for (ch in customReplacements) { allowedChars += ch; } } - allowedChars += separator; - // escape all necessary chars - allowedChars = escapeChars(allowedChars); - + allowedChars = exports.escapeChars(allowedChars); // trim whitespaces input = input.replace(/(^\s+|\s+$)/g, ''); - lastCharWasSymbol = false; lastCharWasDiatric = false; - for (i = 0, l = input.length; i < l; i++) { ch = input[i]; - - if (isReplacedCustomChar(ch, customReplacements)) { + if (exports.isReplacedCustomChar(ch, customReplacements)) { // don't convert a already converted char lastCharWasSymbol = false; } else if (langChar[ch]) { // process language specific diactrics chars conversion ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? ' ' + langChar[ch] : langChar[ch]; - lastCharWasSymbol = false; - } else if (ch in charMap) { + } else if (ch in exports.charMap) { // the transliteration changes entirely when some special characters are added - if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) { + if (i + 1 < l && exports.lookAheadCharArray.indexOf(input[i + 1]) >= 0) { diatricString += ch; ch = ''; } else if (lastCharWasDiatric === true) { - ch = diatricMap[diatricString] + charMap[ch]; + ch = exports.diatricMap[diatricString] + exports.charMap[ch]; diatricString = ''; } else { // process diactrics chars - ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? ' ' + charMap[ch] : charMap[ch]; + ch = lastCharWasSymbol && exports.charMap[ch].match(/[A-Za-z0-9]/) ? ' ' + exports.charMap[ch] : exports.charMap[ch]; } - lastCharWasSymbol = false; lastCharWasDiatric = false; - } else if (ch in diatricMap) { + } else if (ch in exports.diatricMap) { diatricString += ch; ch = ''; // end of string, put the whole meaningful word if (i === l - 1) { - ch = diatricMap[diatricString]; + ch = exports.diatricMap[diatricString]; } lastCharWasDiatric = true; } else if ( // process symbol chars - symbol[ch] && !(uricFlag && uricChars - .indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars - // .indexOf(ch) !== -1) && !(markFlag && markChars + symbol[ch] && !(uricFlag && exports.uricChars + .indexOf(ch) !== -1) && !(uricNoSlashFlag && exports.uricNoSlashChars .indexOf(ch) !== -1)) { ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch]; ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : ''; - lastCharWasSymbol = true; } else { if (lastCharWasDiatric === true) { - ch = diatricMap[diatricString] + ch; + ch = exports.diatricMap[diatricString] + ch; diatricString = ''; lastCharWasDiatric = false; } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) { @@ -1590,100 +1494,66 @@ } lastCharWasSymbol = false; } - // add allowed chars result += ch.replace(new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'), separator); } - if (titleCase) { result = result.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(); }); } - // eliminate duplicate separators // add separator // trim separators from start and end result = result.replace(/\s+/g, separator) .replace(new RegExp('\\' + separator + '+', 'g'), separator) .replace(new RegExp('(^\\' + separator + '+|\\' + separator + '+$)', 'g'), ''); - if (truncate && result.length > truncate) { lucky = result.charAt(truncate) === separator; result = result.slice(0, truncate); - if (!lucky) { result = result.slice(0, result.lastIndexOf(separator)); } } - if (!maintainCase && !titleCase) { result = result.toLowerCase(); } - return result; }; - /** * createSlug curried(opts)(input) * @param {object|string} opts config object or input string * @return {Function} function getSlugWithConfig() **/ - var createSlug = function createSlug(opts) { - + exports.createSlug = function (opts) { /** * getSlugWithConfig * @param {string} input string * @return {string} slug string */ return function getSlugWithConfig(input) { - return getSlug(input, opts); + return exports.getSlug(input, opts); }; }; - /** * escape Chars * @param {string} input string */ - var escapeChars = function escapeChars(input) { + exports.escapeChars = function (input) { return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, '\\$&'); }; - /** * check if the char is an already converted char from custom list * @param {char} ch character to check * @param {object} customReplacements custom translation map */ - var isReplacedCustomChar = function (ch, customReplacements) { + exports.isReplacedCustomChar = function (ch, customReplacements) { for (var c in customReplacements) { if (customReplacements[c] === ch) { return true; } } }; - - if (typeof module !== 'undefined' && module.exports) { - - // export functions for use in Node - module.exports = getSlug; - module.exports.createSlug = createSlug; - } else if (typeof define !== 'undefined' && define.amd) { - - // export function for use in AMD - define([], function () { - return getSlug; - }); - } else { - - // don't overwrite global if exists - try { - if (root.getSlug || root.createSlug) { - throw 'speakingurl: globals exists /(getSlug|createSlug)/'; - } else { - root.getSlug = getSlug; - root.createSlug = createSlug; - } - } catch (e) {} - } -})(this); \ No newline at end of file +}); +//# sourceMappingURL=speakingurl.js.map \ No newline at end of file diff --git a/lib/speakingurl.js.map b/lib/speakingurl.js.map new file mode 100644 index 0000000..fa38381 --- /dev/null +++ b/lib/speakingurl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"speakingurl.js","sourceRoot":"","sources":["../src/speakingurl.ts"],"names":[],"mappings":";;;;;;;;;IAAA;;;OAGG;IACU,eAAO,GAA8B;QAEhD,QAAQ;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,GAAG;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AC,CAAC;YACjC,EAAE,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACjC,MAAM,CAAC,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 355b359..4031c67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "speakingurl", - "version": "14.0.0", + "version": "14.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2729,12 +2729,6 @@ "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", "dev": true }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, "string-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", @@ -2744,6 +2738,12 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", diff --git a/package.json b/package.json index 8492a1d..280e908 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "author": "Sascha Droste (https://twitter.com/SaschaDroste)", "main": "index", "filename": "speakingurl.min.js", + "types": "./typings/speakingurl/speakingurl.d.ts", "dependencies": {}, "devDependencies": { "gulp": "^3.8.8", diff --git a/speakingurl.min.js b/speakingurl.min.js index c621c22..32e85fc 100644 --- a/speakingurl.min.js +++ b/speakingurl.min.js @@ -4,4 +4,4 @@ * @link http://pid.github.io/speakingurl/ * @license BSD * @author - */!function(a){"use strict";var e={"À":"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","أ":"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","گ":"g","چ":"ch","پ":"p","ژ":"zh","ک":"k","ی":"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","က":"k","ခ":"kh","ဂ":"g","ဃ":"ga","င":"ng","စ":"s","ဆ":"sa","ဇ":"z","စျ":"za","ည":"ny","ဋ":"t","ဌ":"ta","ဍ":"d","ဎ":"da","ဏ":"na","တ":"t","ထ":"ta","ဒ":"d","ဓ":"da","န":"n","ပ":"p","ဖ":"pa","ဗ":"b","ဘ":"ba","မ":"m","ယ":"y","ရ":"ya","လ":"l","ဝ":"w","သ":"th","ဟ":"h","ဠ":"la","အ":"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h","ဧ":"e","၏":"-e","ဣ":"i","ဤ":"-i","ဉ":"u","ဦ":"-u","ဩ":"aw","သြော":"aw","ဪ":"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"","č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z","ހ":"h","ށ":"sh","ނ":"n","ރ":"r","ބ":"b","ޅ":"lh","ކ":"k","އ":"a","ވ":"v","މ":"m","ފ":"f","ދ":"dh","ތ":"th","ލ":"l","ގ":"g","ޏ":"gn","ސ":"s","ޑ":"d","ޒ":"z","ޓ":"t","ޔ":"y","ޕ":"p","ޖ":"j","ޗ":"ch","ޘ":"tt","ޙ":"hh","ޚ":"kh","ޛ":"th","ޜ":"z","ޝ":"sh","ޞ":"s","ޟ":"d","ޠ":"t","ޡ":"z","ޢ":"a","ޣ":"gh","ޤ":"q","ޥ":"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"p","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","α":"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","Ω":"O","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"I","Ϋ":"Y","ā":"a","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","ū":"u","Ā":"A","Ē":"E","Ģ":"G","Ī":"I","Ķ":"k","Ļ":"L","Ņ":"N","Ū":"U","Ќ":"Kj","ќ":"kj","Љ":"Lj","љ":"lj","Њ":"Nj","њ":"nj","Тс":"Ts","тс":"ts","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ś":"S","Ź":"Z","Ż":"Z","Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g","ă":"a","Ă":"A","ș":"s","Ș":"S","ț":"t","Ț":"T","ţ":"t","Ţ":"T","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"I","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"Kh","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","ђ":"dj","ј":"j","ћ":"c","џ":"dz","Ђ":"Dj","Ј":"j","Ћ":"C","Џ":"Dz","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ş":"s","Ş":"S","ı":"i","İ":"I","ğ":"g","Ğ":"G","ả":"a","Ả":"A","ẳ":"a","Ẳ":"A","ẩ":"a","Ẩ":"A","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ẻ":"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","Ợ":"O","ỡ":"o","Ỡ":"O","Ở":"o","ở":"o","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ỉ":"i","Ỉ":"i","ủ":"u","Ủ":"U","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ử":"u","Ử":"ư","ỷ":"y","Ỷ":"y","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"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","₺":"TRY","؋":"AFN","₼":"AZN","лв":"BGN","៛":"KHR","₡":"CRC","₸":"KZT","ден":"MKD","zł":"PLN","₽":"RUB","₾":"GEL"},n=["်","ް"],t={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{"ç":"c","ə":"e","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"C","Ə":"E","Ğ":"G","İ":"I","Ö":"O","Ş":"S","Ü":"U"},cs:{"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z"},fi:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},hu:{"ä":"a","Ä":"A","ö":"o","Ö":"O","ü":"u","Ü":"U","ű":"u","Ű":"U"},lt:{"ą":"a","č":"c","ę":"e","ė":"e","į":"i","š":"s","ų":"u","ū":"u","ž":"z","Ą":"A","Č":"C","Ę":"E","Ė":"E","Į":"I","Š":"S","Ų":"U","Ū":"U"},lv:{"ā":"a","č":"c","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","š":"s","ū":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ģ":"G","Ī":"i","Ķ":"k","Ļ":"L","Ņ":"N","Š":"S","Ū":"u","Ž":"Z"},pl:{"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z"},sv:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},sk:{"ä":"a","Ä":"A"},sr:{"љ":"lj","њ":"nj","Љ":"Lj","Њ":"Nj","đ":"dj","Đ":"Dj"},tr:{"Ü":"U","Ö":"O","ü":"u","ö":"o"}},o={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},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"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},u=[";","?",":","@","&","=","+","$",",","/"].join(""),s=[";","?",":","@","&","=","+","$",","].join(""),l=[".","!","~","*","'","(",")"].join(""),r=function(a,r){var m,d,g,k,y,f,p,z,b,A,v,E,O,j,S="-",w="",U="",C=!0,N={},R="";if("string"!=typeof a)return"";if("string"==typeof r&&(S=r),p=o.en,z=i.en,"object"==typeof r){m=r.maintainCase||!1,N=r.custom&&"object"==typeof r.custom?r.custom:N,g=+r.truncate>1&&r.truncate||!1,k=r.uric||!1,y=r.uricNoSlash||!1,f=r.mark||!1,C=!1!==r.symbols&&!1!==r.lang,S=r.separator||S,k&&(R+=u),y&&(R+=s),f&&(R+=l),p=r.lang&&o[r.lang]&&C?o[r.lang]:C?o.en:{},z=r.lang&&i[r.lang]?i[r.lang]:!1===r.lang||!0===r.lang?{}:i.en,r.titleCase&&"number"==typeof r.titleCase.length&&Array.prototype.toString.call(r.titleCase)?(r.titleCase.forEach(function(a){N[a+""]=a+""}),d=!0):d=!!r.titleCase,r.custom&&"number"==typeof r.custom.length&&Array.prototype.toString.call(r.custom)&&r.custom.forEach(function(a){N[a+""]=a+""}),Object.keys(N).forEach(function(e){var n;n=e.length>1?new RegExp("\\b"+h(e)+"\\b","gi"):new RegExp(h(e),"gi"),a=a.replace(n,N[e])});for(v in N)R+=v}for(R=h(R+=S),O=!1,j=!1,A=0,E=(a=a.replace(/(^\s+|\s+$)/g,"")).length;A=0?(U+=v,v=""):!0===j?(v=t[U]+e[v],U=""):v=O&&e[v].match(/[A-Za-z0-9]/)?" "+e[v]:e[v],O=!1,j=!1):v in t?(U+=v,v="",A===E-1&&(v=t[U]),j=!0):!p[v]||k&&-1!==u.indexOf(v)||y&&-1!==s.indexOf(v)?(!0===j?(v=t[U]+v,U="",j=!1):O&&(/[A-Za-z0-9]/.test(v)||w.substr(-1).match(/A-Za-z0-9]/))&&(v=" "+v),O=!1):(v=O||w.substr(-1).match(/[A-Za-z0-9]/)?S+p[v]:p[v],v+=void 0!==a[A+1]&&a[A+1].match(/[A-Za-z0-9]/)?S:"",O=!0),w+=v.replace(new RegExp("[^\\w\\s"+R+"_-]","g"),S);return d&&(w=w.replace(/(\w)(\S*)/g,function(a,e,n){var t=e.toUpperCase()+(null!==n?n:"");return Object.keys(N).indexOf(t.toLowerCase())<0?t:t.toLowerCase()})),w=w.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),g&&w.length>g&&(b=w.charAt(g)===S,w=w.slice(0,g),b||(w=w.slice(0,w.lastIndexOf(S)))),m||d||(w=w.toLowerCase()),w},m=function(a){return function(e){return r(e,a)}},h=function(a){return a.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},c=function(a,e){for(var n in e)if(e[n]===a)return!0};if("undefined"!=typeof module&&module.exports)module.exports=r,module.exports.createSlug=m;else if("undefined"!=typeof define&&define.amd)define([],function(){return r});else try{if(a.getSlug||a.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";a.getSlug=r,a.createSlug=m}catch(a){}}(this); \ No newline at end of file + */!function(a){if("object"==typeof module&&"object"==typeof module.exports){var e=a(require,exports);void 0!==e&&(module.exports=e)}else"function"==typeof define&&define.amd&&define(["require","exports"],a)}(function(a,e){"use strict";e.charMap={"À":"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","أ":"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","گ":"g","چ":"ch","پ":"p","ژ":"zh","ک":"k","ی":"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","က":"k","ခ":"kh","ဂ":"g","ဃ":"ga","င":"ng","စ":"s","ဆ":"sa","ဇ":"z","စျ":"za","ည":"ny","ဋ":"t","ဌ":"ta","ဍ":"d","ဎ":"da","ဏ":"na","တ":"t","ထ":"ta","ဒ":"d","ဓ":"da","န":"n","ပ":"p","ဖ":"pa","ဗ":"b","ဘ":"ba","မ":"m","ယ":"y","ရ":"ya","လ":"l","ဝ":"w","သ":"th","ဟ":"h","ဠ":"la","အ":"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h","ဧ":"e","၏":"-e","ဣ":"i","ဤ":"-i","ဉ":"u","ဦ":"-u","ဩ":"aw","သြော":"aw","ဪ":"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"","č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z","ހ":"h","ށ":"sh","ނ":"n","ރ":"r","ބ":"b","ޅ":"lh","ކ":"k","އ":"a","ވ":"v","މ":"m","ފ":"f","ދ":"dh","ތ":"th","ލ":"l","ގ":"g","ޏ":"gn","ސ":"s","ޑ":"d","ޒ":"z","ޓ":"t","ޔ":"y","ޕ":"p","ޖ":"j","ޗ":"ch","ޘ":"tt","ޙ":"hh","ޚ":"kh","ޛ":"th","ޜ":"z","ޝ":"sh","ޞ":"s","ޟ":"d","ޠ":"t","ޡ":"z","ޢ":"a","ޣ":"gh","ޤ":"q","ޥ":"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"p","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","α":"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","Ω":"O","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"I","Ϋ":"Y","ā":"a","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","ū":"u","Ā":"A","Ē":"E","Ģ":"G","Ī":"I","Ķ":"k","Ļ":"L","Ņ":"N","Ū":"U","Ќ":"Kj","ќ":"kj","Љ":"Lj","љ":"lj","Њ":"Nj","њ":"nj","Тс":"Ts","тс":"ts","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ś":"S","Ź":"Z","Ż":"Z","Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g","ă":"a","Ă":"A","ș":"s","Ș":"S","ț":"t","Ț":"T","ţ":"t","Ţ":"T","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"I","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"Kh","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","ђ":"dj","ј":"j","ћ":"c","џ":"dz","Ђ":"Dj","Ј":"j","Ћ":"C","Џ":"Dz","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ş":"s","Ş":"S","ı":"i","İ":"I","ğ":"g","Ğ":"G","ả":"a","Ả":"A","ẳ":"a","Ẳ":"A","ẩ":"a","Ẩ":"A","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ẻ":"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","Ợ":"O","ỡ":"o","Ỡ":"O","Ở":"o","ở":"o","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ỉ":"i","Ỉ":"i","ủ":"u","Ủ":"U","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ử":"u","Ử":"ư","ỷ":"y","Ỷ":"y","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"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","₺":"TRY","؋":"AFN","₼":"AZN","лв":"BGN","៛":"KHR","₡":"CRC","₸":"KZT","ден":"MKD","zł":"PLN","₽":"RUB","₾":"GEL"},e.lookAheadCharArray=["်","ް"],e.diatricMap={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},e.langCharMap={en:{},az:{"ç":"c","ə":"e","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"C","Ə":"E","Ğ":"G","İ":"I","Ö":"O","Ş":"S","Ü":"U"},cs:{"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z"},fi:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},hu:{"ä":"a","Ä":"A","ö":"o","Ö":"O","ü":"u","Ü":"U","ű":"u","Ű":"U"},lt:{"ą":"a","č":"c","ę":"e","ė":"e","į":"i","š":"s","ų":"u","ū":"u","ž":"z","Ą":"A","Č":"C","Ę":"E","Ė":"E","Į":"I","Š":"S","Ų":"U","Ū":"U"},lv:{"ā":"a","č":"c","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","š":"s","ū":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ģ":"G","Ī":"i","Ķ":"k","Ļ":"L","Ņ":"N","Š":"S","Ū":"u","Ž":"Z"},pl:{"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z"},sv:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},sk:{"ä":"a","Ä":"A"},sr:{"љ":"lj","њ":"nj","Љ":"Lj","Њ":"Nj","đ":"dj","Đ":"Dj"},tr:{"Ü":"U","Ö":"O","ü":"u","ö":"o"}},e.symbolMap={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},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"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},e.uricChars=[";","?",":","@","&","=","+","$",",","/"].join(""),e.uricNoSlashChars=[";","?",":","@","&","=","+","$",","].join(""),e.markChars=[".","!","~","*","'","(",")"].join(""),e.getSlug=function(a,n){var t,i,o,s,r,u,l,h,m,c,d,g,p,y,k="-",f="",A="",b=!0,C={},z="";if("string"!=typeof a)return"";if("string"==typeof n&&(k=n),l=e.symbolMap.en,h=e.langCharMap.en,"object"==typeof n){t=(n=n).maintainCase||!1,C=n.custom&&"object"==typeof n.custom?n.custom:C,o=+n.truncate>1&&n.truncate||!1,s=n.uric||!1,r=n.uricNoSlash||!1,u=n.mark||!1,b=!1!==n.symbols&&!1!==n.lang,k=n.separator||k,s&&(z+=e.uricChars),r&&(z+=e.uricNoSlashChars),u&&(z+=e.markChars),l=n.lang&&e.symbolMap[n.lang]&&b?e.symbolMap[n.lang]:b?e.symbolMap.en:{},h=n.lang&&e.langCharMap[n.lang]?e.langCharMap[n.lang]:!1===n.lang||!0===n.lang?{}:e.langCharMap.en,n.titleCase&&Array.isArray(n.titleCase)&&"number"==typeof n.titleCase.length&&Array.prototype.toString.call(n.titleCase)?(n.titleCase=n.titleCase,n.titleCase.forEach(function(a){C[a+""]=a+""}),i=!0):i=!!n.titleCase,n.custom&&Array.isArray(n.custom)&&"number"==typeof n.custom.length&&Array.prototype.toString.call(n.custom)&&(n.custom=n.custom,n.custom.forEach(function(a){C[a+""]=a+""})),Object.keys(C).forEach(function(n){var t;t=n.length>1?new RegExp("\\b"+e.escapeChars(n)+"\\b","gi"):new RegExp(e.escapeChars(n),"gi"),a=a.replace(t,C[n])});for(d in C)z+=d}for(z+=k,z=e.escapeChars(z),p=!1,y=!1,c=0,g=(a=a.replace(/(^\s+|\s+$)/g,"")).length;c=0?(A+=d,d=""):!0===y?(d=e.diatricMap[A]+e.charMap[d],A=""):d=p&&e.charMap[d].match(/[A-Za-z0-9]/)?" "+e.charMap[d]:e.charMap[d],p=!1,y=!1):d in e.diatricMap?(A+=d,d="",c===g-1&&(d=e.diatricMap[A]),y=!0):!l[d]||s&&-1!==e.uricChars.indexOf(d)||r&&-1!==e.uricNoSlashChars.indexOf(d)?(!0===y?(d=e.diatricMap[A]+d,A="",y=!1):p&&(/[A-Za-z0-9]/.test(d)||f.substr(-1).match(/A-Za-z0-9]/))&&(d=" "+d),p=!1):(d=p||f.substr(-1).match(/[A-Za-z0-9]/)?k+l[d]:l[d],d+=void 0!==a[c+1]&&a[c+1].match(/[A-Za-z0-9]/)?k:"",p=!0),f+=d.replace(new RegExp("[^\\w\\s"+z+"_-]","g"),k);return i&&(f=f.replace(/(\w)(\S*)/g,function(a,e,n){var t=e.toUpperCase()+(null!==n?n:"");return Object.keys(C).indexOf(t.toLowerCase())<0?t:t.toLowerCase()})),f=f.replace(/\s+/g,k).replace(new RegExp("\\"+k+"+","g"),k).replace(new RegExp("(^\\"+k+"+|\\"+k+"+$)","g"),""),o&&f.length>o&&(m=f.charAt(o)===k,f=f.slice(0,o),m||(f=f.slice(0,f.lastIndexOf(k)))),t||i||(f=f.toLowerCase()),f},e.createSlug=function(a){return function(n){return e.getSlug(n,a)}},e.escapeChars=function(a){return a.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},e.isReplacedCustomChar=function(a,e){for(var n in e)if(e[n]===a)return!0}}); \ No newline at end of file diff --git a/src/speakingurl.ts b/src/speakingurl.ts new file mode 100644 index 0000000..67fa840 --- /dev/null +++ b/src/speakingurl.ts @@ -0,0 +1,1736 @@ +/** + * charMap + * @type {Object} + */ +export const charMap: { [key: string]: string } = { + + // latin + 'À': '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', + + // language specific + + // Arabic + 'ا': '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', + + // Persian additional characters than Arabic + 'گ': 'g', + 'چ': 'ch', + 'پ': 'p', + 'ژ': 'zh', + 'ک': 'k', + 'ی': 'y', + + // Arabic diactrics + 'َ': 'a', + 'ً': 'an', + 'ِ': 'e', + 'ٍ': 'en', + 'ُ': 'u', + 'ٌ': 'on', + 'ْ': '', + + // Arabic numbers + '٠': '0', + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + + // Persian numbers + '۰': '0', + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + + // Burmese consonants + 'က': 'k', + 'ခ': 'kh', + 'ဂ': 'g', + 'ဃ': 'ga', + 'င': 'ng', + 'စ': 's', + 'ဆ': 'sa', + 'ဇ': 'z', + 'စျ': 'za', + 'ည': 'ny', + 'ဋ': 't', + 'ဌ': 'ta', + 'ဍ': 'd', + 'ဎ': 'da', + 'ဏ': 'na', + 'တ': 't', + 'ထ': 'ta', + 'ဒ': 'd', + 'ဓ': 'da', + 'န': 'n', + 'ပ': 'p', + 'ဖ': 'pa', + 'ဗ': 'b', + 'ဘ': 'ba', + 'မ': 'm', + 'ယ': 'y', + 'ရ': 'ya', + 'လ': 'l', + 'ဝ': 'w', + 'သ': 'th', + 'ဟ': 'h', + 'ဠ': 'la', + 'အ': 'a', + // consonant character combos + 'ြ': 'y', + 'ျ': 'ya', + 'ွ': 'w', + 'ြွ': 'yw', + 'ျွ': 'ywa', + 'ှ': 'h', + // independent vowels + 'ဧ': 'e', + '၏': '-e', + 'ဣ': 'i', + 'ဤ': '-i', + 'ဉ': 'u', + 'ဦ': '-u', + 'ဩ': 'aw', + 'သြော': 'aw', + 'ဪ': 'aw', + // numbers + '၀': '0', + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + // virama and tone marks which are silent in transliteration + '္': '', + '့': '', + 'း': '', + + // Czech + 'č': 'c', + 'ď': 'd', + 'ě': 'e', + 'ň': 'n', + 'ř': 'r', + 'š': 's', + 'ť': 't', + 'ů': 'u', + 'ž': 'z', + 'Č': 'C', + 'Ď': 'D', + 'Ě': 'E', + 'Ň': 'N', + 'Ř': 'R', + 'Š': 'S', + 'Ť': 'T', + 'Ů': 'U', + 'Ž': 'Z', + + // Dhivehi + 'ހ': 'h', + 'ށ': 'sh', + 'ނ': 'n', + 'ރ': 'r', + 'ބ': 'b', + 'ޅ': 'lh', + 'ކ': 'k', + 'އ': 'a', + 'ވ': 'v', + 'މ': 'm', + 'ފ': 'f', + 'ދ': 'dh', + 'ތ': 'th', + 'ލ': 'l', + 'ގ': 'g', + 'ޏ': 'gn', + 'ސ': 's', + 'ޑ': 'd', + 'ޒ': 'z', + 'ޓ': 't', + 'ޔ': 'y', + 'ޕ': 'p', + 'ޖ': 'j', + 'ޗ': 'ch', + 'ޘ': 'tt', + 'ޙ': 'hh', + 'ޚ': 'kh', + 'ޛ': 'th', + 'ޜ': 'z', + 'ޝ': 'sh', + 'ޞ': 's', + 'ޟ': 'd', + 'ޠ': 't', + 'ޡ': 'z', + 'ޢ': 'a', + 'ޣ': 'gh', + 'ޤ': 'q', + 'ޥ': 'w', + 'ަ': 'a', + 'ާ': 'aa', + 'ި': 'i', + 'ީ': 'ee', + 'ު': 'u', + 'ޫ': 'oo', + 'ެ': 'e', + 'ޭ': 'ey', + 'ޮ': 'o', + 'ޯ': 'oa', + 'ް': '', + + // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian + // National system (2002) + 'ა': 'a', + 'ბ': 'b', + 'გ': 'g', + 'დ': 'd', + 'ე': 'e', + 'ვ': 'v', + 'ზ': 'z', + 'თ': 't', + 'ი': 'i', + 'კ': 'k', + 'ლ': 'l', + 'მ': 'm', + 'ნ': 'n', + 'ო': 'o', + 'პ': 'p', + 'ჟ': 'zh', + 'რ': 'r', + 'ს': 's', + 'ტ': 't', + 'უ': 'u', + 'ფ': 'p', + 'ქ': 'k', + 'ღ': 'gh', + 'ყ': 'q', + 'შ': 'sh', + 'ჩ': 'ch', + 'ც': 'ts', + 'ძ': 'dz', + 'წ': 'ts', + 'ჭ': 'ch', + 'ხ': 'kh', + 'ჯ': 'j', + 'ჰ': 'h', + + // Greek + 'α': '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', + 'Ω': 'O', + 'Ά': 'A', + 'Έ': 'E', + 'Ί': 'I', + 'Ό': 'O', + 'Ύ': 'Y', + 'Ή': 'I', + 'Ώ': 'O', + 'Ϊ': 'I', + 'Ϋ': 'Y', + + // Latvian + 'ā': 'a', + // 'č': 'c', // duplicate + 'ē': 'e', + 'ģ': 'g', + 'ī': 'i', + 'ķ': 'k', + 'ļ': 'l', + 'ņ': 'n', + // 'š': 's', // duplicate + 'ū': 'u', + // 'ž': 'z', // duplicate + 'Ā': 'A', + // 'Č': 'C', // duplicate + 'Ē': 'E', + 'Ģ': 'G', + 'Ī': 'I', + 'Ķ': 'k', + 'Ļ': 'L', + 'Ņ': 'N', + // 'Š': 'S', // duplicate + 'Ū': 'U', + // 'Ž': 'Z', // duplicate + + // Macedonian + 'Ќ': 'Kj', + 'ќ': 'kj', + 'Љ': 'Lj', + 'љ': 'lj', + 'Њ': 'Nj', + 'њ': 'nj', + 'Тс': 'Ts', + 'тс': 'ts', + + // Polish + 'ą': 'a', + 'ć': 'c', + 'ę': 'e', + 'ł': 'l', + 'ń': 'n', + // 'ó': 'o', // duplicate + 'ś': 's', + 'ź': 'z', + 'ż': 'z', + 'Ą': 'A', + 'Ć': 'C', + 'Ę': 'E', + 'Ł': 'L', + 'Ń': 'N', + 'Ś': 'S', + 'Ź': 'Z', + 'Ż': 'Z', + + // Ukranian + 'Є': 'Ye', + 'І': 'I', + 'Ї': 'Yi', + 'Ґ': 'G', + 'є': 'ye', + 'і': 'i', + 'ї': 'yi', + 'ґ': 'g', + + // Romanian + 'ă': 'a', + 'Ă': 'A', + 'ș': 's', + 'Ș': 'S', + // 'ş': 's', // duplicate + // 'Ş': 'S', // duplicate + 'ț': 't', + 'Ț': 'T', + 'ţ': 't', + 'Ţ': 'T', + + // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian + // ICAO + + 'а': 'a', + 'б': 'b', + 'в': 'v', + 'г': 'g', + 'д': 'd', + 'е': 'e', + 'ё': 'yo', + 'ж': 'zh', + 'з': 'z', + 'и': 'i', + 'й': 'i', + 'к': 'k', + 'л': 'l', + 'м': 'm', + 'н': 'n', + 'о': 'o', + 'п': 'p', + 'р': 'r', + 'с': 's', + 'т': 't', + 'у': 'u', + 'ф': 'f', + 'х': 'kh', + 'ц': 'c', + 'ч': 'ch', + 'ш': 'sh', + 'щ': 'sh', + 'ъ': '', + 'ы': 'y', + 'ь': '', + 'э': 'e', + 'ю': 'yu', + 'я': 'ya', + 'А': 'A', + 'Б': 'B', + 'В': 'V', + 'Г': 'G', + 'Д': 'D', + 'Е': 'E', + 'Ё': 'Yo', + 'Ж': 'Zh', + 'З': 'Z', + 'И': 'I', + 'Й': 'I', + 'К': 'K', + 'Л': 'L', + 'М': 'M', + 'Н': 'N', + 'О': 'O', + 'П': 'P', + 'Р': 'R', + 'С': 'S', + 'Т': 'T', + 'У': 'U', + 'Ф': 'F', + 'Х': 'Kh', + 'Ц': 'C', + 'Ч': 'Ch', + 'Ш': 'Sh', + 'Щ': 'Sh', + 'Ъ': '', + 'Ы': 'Y', + 'Ь': '', + 'Э': 'E', + 'Ю': 'Yu', + 'Я': 'Ya', + + // Serbian + 'ђ': 'dj', + 'ј': 'j', + // 'љ': 'lj', // duplicate + // 'њ': 'nj', // duplicate + 'ћ': 'c', + 'џ': 'dz', + 'Ђ': 'Dj', + 'Ј': 'j', + // 'Љ': 'Lj', // duplicate + // 'Њ': 'Nj', // duplicate + 'Ћ': 'C', + 'Џ': 'Dz', + + // Slovak + 'ľ': 'l', + 'ĺ': 'l', + 'ŕ': 'r', + 'Ľ': 'L', + 'Ĺ': 'L', + 'Ŕ': 'R', + + // Turkish + 'ş': 's', + 'Ş': 'S', + 'ı': 'i', + 'İ': 'I', + // 'ç': 'c', // duplicate + // 'Ç': 'C', // duplicate + // 'ü': 'u', // duplicate, see langCharMap + // 'Ü': 'U', // duplicate, see langCharMap + // 'ö': 'o', // duplicate, see langCharMap + // 'Ö': 'O', // duplicate, see langCharMap + 'ğ': 'g', + 'Ğ': 'G', + + // Vietnamese + 'ả': 'a', + 'Ả': 'A', + 'ẳ': 'a', + 'Ẳ': 'A', + 'ẩ': 'a', + 'Ẩ': 'A', + 'đ': 'd', + 'Đ': 'D', + 'ẹ': 'e', + 'Ẹ': 'E', + 'ẽ': 'e', + 'Ẽ': 'E', + 'ẻ': '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', + 'Ợ': 'O', + 'ỡ': 'o', + 'Ỡ': 'O', + 'Ở': 'o', + 'ở': 'o', + 'ị': 'i', + 'Ị': 'I', + 'ĩ': 'i', + 'Ĩ': 'I', + 'ỉ': 'i', + 'Ỉ': 'i', + 'ủ': 'u', + 'Ủ': 'U', + 'ụ': 'u', + 'Ụ': 'U', + 'ũ': 'u', + 'Ũ': 'U', + 'ư': 'u', + 'Ư': 'U', + 'ứ': 'u', + 'Ứ': 'U', + 'ừ': 'u', + 'Ừ': 'U', + 'ự': 'u', + 'Ự': 'U', + 'ữ': 'u', + 'Ữ': 'U', + 'ử': 'u', + 'Ử': 'ư', + 'ỷ': 'y', + 'Ỷ': 'y', + 'ỳ': 'y', + 'Ỳ': 'Y', + 'ỵ': 'y', + 'Ỵ': 'Y', + 'ỹ': 'y', + 'Ỹ': 'Y', + 'ạ': 'a', + 'Ạ': 'A', + 'ấ': 'a', + 'Ấ': 'A', + 'ầ': 'a', + 'Ầ': 'A', + 'ậ': 'a', + 'Ậ': 'A', + 'ẫ': 'a', + 'Ẫ': 'A', + // 'ă': 'a', // duplicate + // 'Ă': 'A', // duplicate + 'ắ': 'a', + 'Ắ': 'A', + 'ằ': 'a', + 'Ằ': 'A', + 'ặ': 'a', + 'Ặ': 'A', + 'ẵ': 'a', + 'Ẵ': 'A', + "⓪": "0", + "①": "1", + "②": "2", + "③": "3", + "④": "4", + "⑤": "5", + "⑥": "6", + "⑦": "7", + "⑧": "8", + "⑨": "9", + "⑩": "10", + "⑪": "11", + "⑫": "12", + "⑬": "13", + "⑭": "14", + "⑮": "15", + "⑯": "16", + "⑰": "17", + "⑱": "18", + "⑲": "18", + "⑳": "18", + + "⓵": "1", + "⓶": "2", + "⓷": "3", + "⓸": "4", + "⓹": "5", + "⓺": "6", + "⓻": "7", + "⓼": "8", + "⓽": "9", + "⓾": "10", + + "⓿": "0", + "⓫": "11", + "⓬": "12", + "⓭": "13", + "⓮": "14", + "⓯": "15", + "⓰": "16", + "⓱": "17", + "⓲": "18", + "⓳": "19", + "⓴": "20", + + "Ⓐ": "A", + "Ⓑ": "B", + "Ⓒ": "C", + "Ⓓ": "D", + "Ⓔ": "E", + "Ⓕ": "F", + "Ⓖ": "G", + "Ⓗ": "H", + "Ⓘ": "I", + "Ⓙ": "J", + "Ⓚ": "K", + "Ⓛ": "L", + "Ⓜ": "M", + "Ⓝ": "N", + "Ⓞ": "O", + "Ⓟ": "P", + "Ⓠ": "Q", + "Ⓡ": "R", + "Ⓢ": "S", + "Ⓣ": "T", + "Ⓤ": "U", + "Ⓥ": "V", + "Ⓦ": "W", + "Ⓧ": "X", + "Ⓨ": "Y", + "Ⓩ": "Z", + + "ⓐ": "a", + "ⓑ": "b", + "ⓒ": "c", + "ⓓ": "d", + "ⓔ": "e", + "ⓕ": "f", + "ⓖ": "g", + "ⓗ": "h", + "ⓘ": "i", + "ⓙ": "j", + "ⓚ": "k", + "ⓛ": "l", + "ⓜ": "m", + "ⓝ": "n", + "ⓞ": "o", + "ⓟ": "p", + "ⓠ": "q", + "ⓡ": "r", + "ⓢ": "s", + "ⓣ": "t", + "ⓤ": "u", + "ⓦ": "v", + "ⓥ": "w", + "ⓧ": "x", + "ⓨ": "y", + "ⓩ": "z", + + // symbols + '“': '"', + '”': '"', + '‘': "'", + '’': "'", + '∂': 'd', + 'ƒ': 'f', + '™': '(TM)', + '©': '(C)', + 'œ': 'oe', + 'Œ': 'OE', + '®': '(R)', + '†': '+', + '℠': '(SM)', + '…': '...', + '˚': 'o', + 'º': 'o', + 'ª': 'a', + '•': '*', + '၊': ',', + '။': '.', + + // currency + '$': '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', + '₺': 'TRY', + '؋': 'AFN', + '₼': 'AZN', + 'лв': 'BGN', + '៛': 'KHR', + '₡': 'CRC', + '₸': 'KZT', + 'ден': 'MKD', + 'zł': 'PLN', + '₽': 'RUB', + '₾': 'GEL' +}; + +/** + * special look ahead character array + * These characters form with consonants to become 'single'/consonant combo + * @type [Array] + */ +export const lookAheadCharArray = [ + // burmese + '်', + + // Dhivehi + 'ް' +]; + +/** + * diatricMap for languages where transliteration changes entirely as more diatrics are added + * @type {Object} + */ +export const diatricMap = { + // Burmese + // dependent vowels + 'ာ': 'a', + 'ါ': 'a', + 'ေ': 'e', + 'ဲ': 'e', + 'ိ': 'i', + 'ီ': 'i', + 'ို': 'o', + 'ု': 'u', + 'ူ': 'u', + 'ေါင်': 'aung', + 'ော': 'aw', + 'ော်': 'aw', + 'ေါ': 'aw', + 'ေါ်': 'aw', + '်': '်', // this is special case but the character will be converted to latin in the code + 'က်': 'et', + 'ိုက်': 'aik', + 'ောက်': 'auk', + 'င်': 'in', + 'ိုင်': 'aing', + 'ောင်': 'aung', + 'စ်': 'it', + 'ည်': 'i', + 'တ်': 'at', + 'ိတ်': 'eik', + 'ုတ်': 'ok', + 'ွတ်': 'ut', + 'ေတ်': 'it', + 'ဒ်': 'd', + 'ိုဒ်': 'ok', + 'ုဒ်': 'ait', + 'န်': 'an', + 'ာန်': 'an', + 'ိန်': 'ein', + 'ုန်': 'on', + 'ွန်': 'un', + 'ပ်': 'at', + 'ိပ်': 'eik', + 'ုပ်': 'ok', + 'ွပ်': 'ut', + 'န်ုပ်': 'nub', + 'မ်': 'an', + 'ိမ်': 'ein', + 'ုမ်': 'on', + 'ွမ်': 'un', + 'ယ်': 'e', + 'ိုလ်': 'ol', + 'ဉ်': 'in', + 'ံ': 'an', + 'ိံ': 'ein', + 'ုံ': 'on', + + // Dhivehi + 'ައް': 'ah', + 'ަށް': 'ah' +}; + +/** + * langCharMap language specific characters translations + * @type {Object} + */ +export const langCharMap = { + 'en': {}, // default language + + 'az': { // Azerbaijani + 'ç': 'c', + 'ə': 'e', + 'ğ': 'g', + 'ı': 'i', + 'ö': 'o', + 'ş': 's', + 'ü': 'u', + 'Ç': 'C', + 'Ə': 'E', + 'Ğ': 'G', + 'İ': 'I', + 'Ö': 'O', + 'Ş': 'S', + 'Ü': 'U' + }, + + 'cs': { // Czech + 'č': 'c', + 'ď': 'd', + 'ě': 'e', + 'ň': 'n', + 'ř': 'r', + 'š': 's', + 'ť': 't', + 'ů': 'u', + 'ž': 'z', + 'Č': 'C', + 'Ď': 'D', + 'Ě': 'E', + 'Ň': 'N', + 'Ř': 'R', + 'Š': 'S', + 'Ť': 'T', + 'Ů': 'U', + 'Ž': 'Z' + }, + + 'fi': { // Finnish + // 'å': 'a', duplicate see charMap/latin + // 'Å': 'A', duplicate see charMap/latin + 'ä': 'a', // ok + 'Ä': 'A', // ok + 'ö': 'o', // ok + 'Ö': 'O' // ok + }, + + 'hu': { // Hungarian + 'ä': 'a', // ok + 'Ä': 'A', // ok + // 'á': 'a', duplicate see charMap/latin + // 'Á': 'A', duplicate see charMap/latin + 'ö': 'o', // ok + 'Ö': 'O', // ok + // 'ő': 'o', duplicate see charMap/latin + // 'Ő': 'O', duplicate see charMap/latin + 'ü': 'u', + 'Ü': 'U', + 'ű': 'u', + 'Ű': 'U' + }, + + 'lt': { // Lithuanian + 'ą': 'a', + 'č': 'c', + 'ę': 'e', + 'ė': 'e', + 'į': 'i', + 'š': 's', + 'ų': 'u', + 'ū': 'u', + 'ž': 'z', + 'Ą': 'A', + 'Č': 'C', + 'Ę': 'E', + 'Ė': 'E', + 'Į': 'I', + 'Š': 'S', + 'Ų': 'U', + 'Ū': 'U' + }, + + 'lv': { // Latvian + 'ā': 'a', + 'č': 'c', + 'ē': 'e', + 'ģ': 'g', + 'ī': 'i', + 'ķ': 'k', + 'ļ': 'l', + 'ņ': 'n', + 'š': 's', + 'ū': 'u', + 'ž': 'z', + 'Ā': 'A', + 'Č': 'C', + 'Ē': 'E', + 'Ģ': 'G', + 'Ī': 'i', + 'Ķ': 'k', + 'Ļ': 'L', + 'Ņ': 'N', + 'Š': 'S', + 'Ū': 'u', + 'Ž': 'Z' + }, + + 'pl': { // Polish + 'ą': 'a', + 'ć': 'c', + 'ę': 'e', + 'ł': 'l', + 'ń': 'n', + 'ó': 'o', + 'ś': 's', + 'ź': 'z', + 'ż': 'z', + 'Ą': 'A', + 'Ć': 'C', + 'Ę': 'e', + 'Ł': 'L', + 'Ń': 'N', + 'Ó': 'O', + 'Ś': 'S', + 'Ź': 'Z', + 'Ż': 'Z' + }, + + 'sv': { // Swedish + // 'å': 'a', duplicate see charMap/latin + // 'Å': 'A', duplicate see charMap/latin + 'ä': 'a', // ok + 'Ä': 'A', // ok + 'ö': 'o', // ok + 'Ö': 'O' // ok + }, + + 'sk': { // Slovak + 'ä': 'a', + 'Ä': 'A' + }, + + 'sr': { // Serbian + 'љ': 'lj', + 'њ': 'nj', + 'Љ': 'Lj', + 'Њ': 'Nj', + 'đ': 'dj', + 'Đ': 'Dj' + }, + + 'tr': { // Turkish + 'Ü': 'U', + 'Ö': 'O', + 'ü': 'u', + 'ö': 'o' + } +}; + +/** + * symbolMap language specific symbol translations + * translations must be transliterated already + * @type {Object} + */ +export const symbolMap = { + 'ar': { + '∆': 'delta', + '∞': 'la-nihaya', + '♥': 'hob', + '&': 'wa', + '|': 'aw', + '<': 'aqal-men', + '>': 'akbar-men', + '∑': 'majmou', + '¤': 'omla' + }, + + 'az': {}, + + 'ca': { + '∆': 'delta', + '∞': 'infinit', + '♥': 'amor', + '&': 'i', + '|': 'o', + '<': 'menys que', + '>': 'mes que', + '∑': 'suma dels', + '¤': 'moneda' + }, + + 'cs': { + '∆': 'delta', + '∞': 'nekonecno', + '♥': 'laska', + '&': 'a', + '|': 'nebo', + '<': 'mensi nez', + '>': 'vetsi nez', + '∑': 'soucet', + '¤': 'mena' + }, + + 'de': { + '∆': 'delta', + '∞': 'unendlich', + '♥': 'Liebe', + '&': 'und', + '|': 'oder', + '<': 'kleiner als', + '>': 'groesser als', + '∑': 'Summe von', + '¤': 'Waehrung' + }, + + 'dv': { + '∆': 'delta', + '∞': 'kolunulaa', + '♥': 'loabi', + '&': 'aai', + '|': 'noonee', + '<': 'ah vure kuda', + '>': 'ah vure bodu', + '∑': 'jumula', + '¤': 'faisaa' + }, + + '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' + }, + + 'fa': { + '∆': 'delta', + '∞': 'bi-nahayat', + '♥': 'eshgh', + '&': 'va', + '|': 'ya', + '<': 'kamtar-az', + '>': 'bishtar-az', + '∑': 'majmooe', + '¤': 'vahed' + }, + + 'fi': { + '∆': 'delta', + '∞': 'aarettomyys', + '♥': 'rakkaus', + '&': 'ja', + '|': 'tai', + '<': 'pienempi kuin', + '>': 'suurempi kuin', + '∑': 'summa', + '¤': 'valuutta' + }, + + 'fr': { + '∆': 'delta', + '∞': 'infiniment', + '♥': 'Amour', + '&': 'et', + '|': 'ou', + '<': 'moins que', + '>': 'superieure a', + '∑': 'somme des', + '¤': 'monnaie' + }, + + 'ge': { + '∆': 'delta', + '∞': 'usasruloba', + '♥': 'siqvaruli', + '&': 'da', + '|': 'an', + '<': 'naklebi', + '>': 'meti', + '∑': 'jami', + '¤': 'valuta' + }, + + 'gr': {}, + + 'hu': { + '∆': 'delta', + '∞': 'vegtelen', + '♥': 'szerelem', + '&': 'es', + '|': 'vagy', + '<': 'kisebb mint', + '>': 'nagyobb mint', + '∑': 'szumma', + '¤': 'penznem' + }, + + 'it': { + '∆': 'delta', + '∞': 'infinito', + '♥': 'amore', + '&': 'e', + '|': 'o', + '<': 'minore di', + '>': 'maggiore di', + '∑': 'somma', + '¤': 'moneta' + }, + + 'lt': { + '∆': 'delta', + '∞': 'begalybe', + '♥': 'meile', + '&': 'ir', + '|': 'ar', + '<': 'maziau nei', + '>': 'daugiau nei', + '∑': 'suma', + '¤': 'valiuta' + }, + + 'lv': { + '∆': 'delta', + '∞': 'bezgaliba', + '♥': 'milestiba', + '&': 'un', + '|': 'vai', + '<': 'mazak neka', + '>': 'lielaks neka', + '∑': 'summa', + '¤': 'valuta' + }, + + 'my': { + '∆': 'kwahkhyaet', + '∞': 'asaonasme', + '♥': 'akhyait', + '&': 'nhin', + '|': 'tho', + '<': 'ngethaw', + '>': 'kyithaw', + '∑': 'paungld', + '¤': 'ngwekye' + }, + + 'mk': {}, + + 'nl': { + '∆': 'delta', + '∞': 'oneindig', + '♥': 'liefde', + '&': 'en', + '|': 'of', + '<': 'kleiner dan', + '>': 'groter dan', + '∑': 'som', + '¤': 'valuta' + }, + + 'pl': { + '∆': 'delta', + '∞': 'nieskonczonosc', + '♥': 'milosc', + '&': 'i', + '|': 'lub', + '<': 'mniejsze niz', + '>': 'wieksze niz', + '∑': 'suma', + '¤': 'waluta' + }, + + 'pt': { + '∆': 'delta', + '∞': 'infinito', + '♥': 'amor', + '&': 'e', + '|': 'ou', + '<': 'menor que', + '>': 'maior que', + '∑': 'soma', + '¤': 'moeda' + }, + + 'ro': { + '∆': 'delta', + '∞': 'infinit', + '♥': 'dragoste', + '&': 'si', + '|': 'sau', + '<': 'mai mic ca', + '>': 'mai mare ca', + '∑': 'suma', + '¤': 'valuta' + }, + + 'ru': { + '∆': 'delta', + '∞': 'beskonechno', + '♥': 'lubov', + '&': 'i', + '|': 'ili', + '<': 'menshe', + '>': 'bolshe', + '∑': 'summa', + '¤': 'valjuta' + }, + + 'sk': { + '∆': 'delta', + '∞': 'nekonecno', + '♥': 'laska', + '&': 'a', + '|': 'alebo', + '<': 'menej ako', + '>': 'viac ako', + '∑': 'sucet', + '¤': 'mena' + }, + + 'sr': {}, + + 'tr': { + '∆': 'delta', + '∞': 'sonsuzluk', + '♥': 'ask', + '&': 've', + '|': 'veya', + '<': 'kucuktur', + '>': 'buyuktur', + '∑': 'toplam', + '¤': 'para birimi' + }, + + 'uk': { + '∆': 'delta', + '∞': 'bezkinechnist', + '♥': 'lubov', + '&': 'i', + '|': 'abo', + '<': 'menshe', + '>': 'bilshe', + '∑': 'suma', + '¤': 'valjuta' + }, + + 'vn': { + '∆': 'delta', + '∞': 'vo cuc', + '♥': 'yeu', + '&': 'va', + '|': 'hoac', + '<': 'nho hon', + '>': 'lon hon', + '∑': 'tong', + '¤': 'tien te' + } +}; + +export const uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join(''); + +export const uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join(''); + +export const markChars = ['.', '!', '~', '*', "'", '(', ')'].join(''); +/** + * Interface for the SpeakingURL options + * @see {@link https://github.com/pid/speakingurl#usage} + */ +export interface speakingurlOptions { + /** + * Character that replaces the whitespaces + * @default '-' + */ + separator?: string; + /** + * ISO 639-1 Codes for language specific transliteration + * @default 'en' + */ + lang?: string | boolean; + + /** + * Converts symbols according to the 'lang' setting if true. Don't convert symbols if false + * @default true + */ + symbols?: boolean; + + + /** + * Maintains case chars if true. Convert all chars to lower case if false + * @default false + */ + maintainCase?: boolean; + + + /** + * converts input string to title-case if true. Omit the words from the array if array is given. + * @default false + */ + titleCase?: boolean | string[]; + + + /** + * Don't trim length if 0. Trim to max length while not breaking any words if greater or equal to 1. + * @default 0 + */ + truncate?: number; + + + /** + * Allow additional characters if true. + * Characters allowed: ";", "?", ":", "@", "&", "=", "+", "\$", ",", "/" + * @default false + */ + uric?: boolean; + + + /** + * Allow additional characters if true. + * Characters allowed: ";", "?", ":", "@", "&", "=", "+", "\$", "," + * @default false + */ + uricNoSlash?: boolean; + + + /** + * Allow additional characters if true. + * Characters allowed: "-", "_", ".", "!", "~", "*", "'", "(", ")" + * @default false + */ + mark?: boolean; + + + /** + * custom map for translation if object provided. Add array chars to allowed charMap if array provided. + * @default {} + */ + custom?: { [key: string]: string } | string[] + +} +/** + * getSlug + * @param {string} input input string + * @param {object|string} opts config object or separator string/char + * @api public + * @return {string} sluggified string + */ +export const getSlug = (input: string, opts: speakingurlOptions | string): string => { + let separator = '-'; + let result = ''; + let diatricString = ''; + let convertSymbols = true; + let customReplacements = {}; + let maintainCase; + let titleCase; + let truncate; + let uricFlag; + let uricNoSlashFlag; + let markFlag; + let symbol; + let langChar; + let lucky; + let i; + let ch; + let l; + let lastCharWasSymbol; + let lastCharWasDiatric; + let allowedChars = ''; + + if (typeof input !== 'string') { + return ''; + } + + if (typeof opts === 'string') { + separator = opts; + } + + symbol = symbolMap.en; + langChar = langCharMap.en; + + if (typeof opts === 'object') { + opts = opts; + maintainCase = opts.maintainCase || false; + customReplacements = (opts.custom && typeof opts.custom === 'object') ? opts.custom : customReplacements; + truncate = (+opts.truncate > 1 && opts.truncate) || false; + uricFlag = opts.uric || false; + uricNoSlashFlag = opts.uricNoSlash || false; + markFlag = opts.mark || false; + convertSymbols = (opts.symbols === false || opts.lang === false) ? false : true; + separator = opts.separator || separator; + + if (uricFlag) { + allowedChars += uricChars; + } + + if (uricNoSlashFlag) { + allowedChars += uricNoSlashChars; + } + + if (markFlag) { + allowedChars += markChars; + } + + symbol = (opts.lang && symbolMap[opts.lang] && convertSymbols) ? + symbolMap[opts.lang] : (convertSymbols ? symbolMap.en : {}); + + langChar = (opts.lang && langCharMap[opts.lang]) ? + langCharMap[opts.lang] : + opts.lang === false || opts.lang === true ? {} : langCharMap.en; + + // if titleCase config is an Array, rewrite to object format + if (opts.titleCase && Array.isArray(opts.titleCase) && typeof opts.titleCase.length === 'number' && Array.prototype.toString.call(opts.titleCase)) { + opts.titleCase = opts.titleCase; + opts.titleCase.forEach(function (v) { + customReplacements[v + ''] = v + ''; + }); + + titleCase = true; + } else { + titleCase = !!opts.titleCase; + } + + // if custom config is an Array, rewrite to object format + if (opts.custom && Array.isArray(opts.custom) && typeof opts.custom.length === 'number' && Array.prototype.toString.call(opts.custom)) { + opts.custom = opts.custom; + opts.custom.forEach(function (v) { + customReplacements[v + ''] = v + ''; + }); + } + + // custom replacements + Object.keys(customReplacements).forEach(function (v) { + let r; + + if (v.length > 1) { + r = new RegExp('\\b' + escapeChars(v) + '\\b', 'gi'); + } else { + r = new RegExp(escapeChars(v), 'gi'); + } + + input = input.replace(r, customReplacements[v]); + }); + + // add all custom replacement to allowed charlist + for (ch in customReplacements) { + allowedChars += ch; + } + } + + allowedChars += separator; + + // escape all necessary chars + allowedChars = escapeChars(allowedChars); + + // trim whitespaces + input = input.replace(/(^\s+|\s+$)/g, ''); + + lastCharWasSymbol = false; + lastCharWasDiatric = false; + + for (i = 0, l = input.length; i < l; i++) { + ch = input[i]; + + if (isReplacedCustomChar(ch, customReplacements)) { + // don't convert a already converted char + lastCharWasSymbol = false; + } else if (langChar[ch]) { + // process language specific diactrics chars conversion + ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? ' ' + langChar[ch] : langChar[ch]; + + lastCharWasSymbol = false; + } else if (ch in charMap) { + // the transliteration changes entirely when some special characters are added + if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) { + diatricString += ch; + ch = ''; + } else if (lastCharWasDiatric === true) { + ch = diatricMap[diatricString] + charMap[ch]; + diatricString = ''; + } else { + // process diactrics chars + ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? ' ' + charMap[ch] : charMap[ch]; + } + + lastCharWasSymbol = false; + lastCharWasDiatric = false; + } else if (ch in diatricMap) { + diatricString += ch; + ch = ''; + // end of string, put the whole meaningful word + if (i === l - 1) { + ch = diatricMap[diatricString]; + } + lastCharWasDiatric = true; + } else if ( + // process symbol chars + symbol[ch] && !(uricFlag && uricChars + .indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars + // .indexOf(ch) !== -1) && !(markFlag && markChars + .indexOf(ch) !== -1)) { + ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch]; + ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : ''; + + lastCharWasSymbol = true; + } else { + if (lastCharWasDiatric === true) { + ch = diatricMap[diatricString] + ch; + diatricString = ''; + lastCharWasDiatric = false; + } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) { + // process latin chars + ch = ' ' + ch; + } + lastCharWasSymbol = false; + } + + // add allowed chars + result += ch.replace(new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'), separator); + } + + if (titleCase) { + result = result.replace(/(\w)(\S*)/g, function (_, i, r) { + let j = i.toUpperCase() + (r !== null ? r : ''); + return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase(); + }); + } + + // eliminate duplicate separators + // add separator + // trim separators from start and end + result = result.replace(/\s+/g, separator) + .replace(new RegExp('\\' + separator + '+', 'g'), separator) + .replace(new RegExp('(^\\' + separator + '+|\\' + separator + '+$)', 'g'), ''); + + if (truncate && result.length > truncate) { + lucky = result.charAt(truncate) === separator; + result = result.slice(0, truncate); + + if (!lucky) { + result = result.slice(0, result.lastIndexOf(separator)); + } + } + + if (!maintainCase && !titleCase) { + result = result.toLowerCase(); + } + + return result; +} + +/** + * createSlug curried(opts)(input) + * @param {object|string} opts config object or input string + * @return {Function} function getSlugWithConfig() + **/ +export const createSlug = (opts: {} | string) => { + /** + * getSlugWithConfig + * @param {string} input string + * @return {string} slug string + */ + return function getSlugWithConfig(input: string): string { + return getSlug(input, opts); + }; +} + +/** + * escape Chars + * @param {string} input string + */ +export const escapeChars = (input: string): string => { + return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, '\\$&'); +} + +/** + * check if the char is an already converted char from custom list + * @param {char} ch character to check + * @param {object} customReplacements custom translation map + */ +export const isReplacedCustomChar = (ch: string, customReplacements: {}) => { + for (let c in customReplacements) { + if (customReplacements[c] === ch) { + return true; + } + } +} \ No newline at end of file diff --git a/test/test-arabic.js b/test/test-arabic.js index 76de387..f9c3fbc 100644 --- a/test/test-arabic.js +++ b/test/test-arabic.js @@ -1,6 +1,4 @@ -/* global describe,it */ - -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate arabic letters', function () { 'use strict'; diff --git a/test/test-burmese.js b/test/test-burmese.js index 9a26aac..c89cbd9 100644 --- a/test/test-burmese.js +++ b/test/test-burmese.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate burmese letters', function () { 'use strict'; diff --git a/test/test-create.js b/test/test-create.js index ec79b7e..56d7f15 100644 --- a/test/test-create.js +++ b/test/test-create.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug create', function () { 'use strict'; diff --git a/test/test-custom.js b/test/test-custom.js index aea5ef0..f96040c 100644 --- a/test/test-custom.js +++ b/test/test-custom.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug with custom replacement', function () { 'use strict'; diff --git a/test/test-cyrillic.js b/test/test-cyrillic.js index 4394a7f..5c362a3 100644 --- a/test/test-cyrillic.js +++ b/test/test-cyrillic.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate cyrillic letters', function () { 'use strict'; diff --git a/test/test-defaults.js b/test/test-defaults.js index 259dd77..5a2aaf2 100644 --- a/test/test-defaults.js +++ b/test/test-defaults.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug defaults', function () { 'use strict'; diff --git a/test/test-dhivehi.js b/test/test-dhivehi.js index c304af7..dccd04d 100644 --- a/test/test-dhivehi.js +++ b/test/test-dhivehi.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate dhivehi letters', function () { 'use strict'; diff --git a/test/test-georgien.js b/test/test-georgien.js index 826b84e..73b4580 100644 --- a/test/test-georgien.js +++ b/test/test-georgien.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate georgien letters', function () { 'use strict'; diff --git a/test/test-hungarian.js b/test/test-hungarian.js index 22b7838..08b6178 100644 --- a/test/test-hungarian.js +++ b/test/test-hungarian.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate hungarian letters', function () { 'use strict'; diff --git a/test/test-lang.js b/test/test-lang.js index 562fa31..9dbd8d1 100644 --- a/test/test-lang.js +++ b/test/test-lang.js @@ -1,5 +1,5 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug symbols', function () { 'use strict'; diff --git a/test/test-language.js b/test/test-language.js index c244335..09ec16f 100644 --- a/test/test-language.js +++ b/test/test-language.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug languages', function () { 'use strict'; diff --git a/test/test-maintaincase.js b/test/test-maintaincase.js index 0540f50..a93b39d 100644 --- a/test/test-maintaincase.js +++ b/test/test-maintaincase.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug maintainCase', function () { 'use strict'; diff --git a/test/test-persian.js b/test/test-persian.js index 9d9dea4..5a0b9a3 100644 --- a/test/test-persian.js +++ b/test/test-persian.js @@ -1,4 +1,4 @@ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug translate persian letters/numbers', function () { 'use strict'; diff --git a/test/test-rfc3986.js b/test/test-rfc3986.js index 23fbead..a2450f1 100644 --- a/test/test-rfc3986.js +++ b/test/test-rfc3986.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug rfc3986', function () { 'use strict'; diff --git a/test/test-separator.js b/test/test-separator.js index 62d78b6..50e73aa 100644 --- a/test/test-separator.js +++ b/test/test-separator.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug separator', function () { 'use strict'; diff --git a/test/test-speakingurl.js b/test/test-speakingurl.js index d14fd44..ac07484 100644 --- a/test/test-speakingurl.js +++ b/test/test-speakingurl.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug config combinations', function () { 'use strict'; diff --git a/test/test-symbols.js b/test/test-symbols.js index 83e9ebf..fa6fa80 100644 --- a/test/test-symbols.js +++ b/test/test-symbols.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug symbols', function () { 'use strict'; diff --git a/test/test-titlecase.js b/test/test-titlecase.js index c31d7ff..73c0c62 100644 --- a/test/test-titlecase.js +++ b/test/test-titlecase.js @@ -1,23 +1,23 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var speakingurl = require('../lib/speakingurl'); describe('getSlug titleCase', function () { 'use strict'; it('should title-case the characters', function (done) { - getSlug('This is big foo', { + speakingurl.getSlug('This is big foo', { titleCase: true }) .should.eql('This-Is-Big-Foo'); - getSlug('This is Big foo', { + speakingurl.getSlug('This is Big foo', { titleCase: true }) .should.eql('This-Is-Big-Foo'); - getSlug('Don\'t drink and drive', { + speakingurl.getSlug('Don\'t drink and drive', { titleCase: true }) .should.eql('Don-t-Drink-And-Drive'); @@ -27,39 +27,39 @@ describe('getSlug titleCase', function () { it('should title-case the characters with custom array', function (done) { - getSlug('This is yet foo and bar', { + speakingurl.getSlug('This is yet foo and bar', { titleCase: ['and', 'yet'] }) .should.eql('This-Is-yet-Foo-and-Bar'); - getSlug('This is a foo and an angry bird', { + speakingurl.getSlug('This is a foo and an angry bird', { titleCase: ['a', 'an', 'and'] }) .should.eql('This-Is-a-Foo-and-an-Angry-Bird'); - getSlug('This is a foo and an angry bird show', { + speakingurl.getSlug('This is a foo and an angry bird show', { titleCase: ['a'] }) .should.eql('This-Is-a-Foo-And-An-Angry-Bird-Show'); - getSlug('Don\'t drink and drive', { + speakingurl.getSlug('Don\'t drink and drive', { titleCase: ['and'] }) .should.eql('Don-t-Drink-and-Drive'); - getSlug('Don\'t drink and drive', { + speakingurl.getSlug('Don\'t drink and drive', { titleCase: {} }) .should.eql('Don-t-Drink-And-Drive'); - getSlug('Don\'t drink and drive', { + speakingurl.getSlug('Don\'t drink and drive', { titleCase: { 'drink': 'drive' } }) .should.eql('Don-t-Drink-And-Drive'); - getSlug('Don\'t drink and drive', { + speakingurl.getSlug('Don\'t drink and drive', { titleCase: 42 }) .should.eql('Don-t-Drink-And-Drive'); diff --git a/test/test-truncate.js b/test/test-truncate.js index 65887fb..c35e59c 100644 --- a/test/test-truncate.js +++ b/test/test-truncate.js @@ -1,6 +1,6 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var getSlug = require('../lib/speakingurl').getSlug; describe('getSlug smart truncate', function () { 'use strict'; diff --git a/test/test-turkish.js b/test/test-turkish.js index 39ac409..788ec04 100644 --- a/test/test-turkish.js +++ b/test/test-turkish.js @@ -1,18 +1,18 @@ /* global describe,it */ -var getSlug = require('../lib/speakingurl'); +var speakingurl = require('../lib/speakingurl'); describe('getSlug translate turkish letters', function () { 'use strict'; it('umlaut should be single letter transliteration', function (done) { - getSlug('ÜÄÖüäö', { + speakingurl.getSlug('ÜÄÖüäö', { lang: 'tr' }) .should.eql('uaeouaeo'); - getSlug('ÜÖÄ äüö', { + speakingurl.getSlug('ÜÖÄ äüö', { lang: 'tr' }) .should.eql('uoae-aeuo'); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..db2b40a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "umd", + "target": "es5", + "noImplicitAny": false, + "sourceMap": true, + "declaration": true, + "declarationDir": "typings/speakingurl", + "outDir": "lib", + "lib": [ + "dom", + "es5" + ] + }, + "include": [ + "src/**.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/typings/speakingurl/speakingurl.d.ts b/typings/speakingurl/speakingurl.d.ts index b03c0e7..0fd1703 100644 --- a/typings/speakingurl/speakingurl.d.ts +++ b/typings/speakingurl/speakingurl.d.ts @@ -1,8 +1,515 @@ +/** + * charMap + * @type {Object} + */ +export declare const charMap: { + [key: string]: string; +}; +/** + * special look ahead character array + * These characters form with consonants to become 'single'/consonant combo + * @type [Array] + */ +export declare const lookAheadCharArray: string[]; +/** + * diatricMap for languages where transliteration changes entirely as more diatrics are added + * @type {Object} + */ +export declare const diatricMap: { + 'ာ': string; + 'ါ': string; + 'ေ': string; + 'ဲ': string; + 'ိ': string; + 'ီ': string; + 'ို': string; + 'ု': string; + 'ူ': string; + 'ေါင်': string; + 'ော': string; + 'ော်': string; + 'ေါ': string; + 'ေါ်': string; + '်': string; + 'က်': string; + 'ိုက်': string; + 'ောက်': string; + 'င်': string; + 'ိုင်': string; + 'ောင်': string; + 'စ်': string; + 'ည်': string; + 'တ်': string; + 'ိတ်': string; + 'ုတ်': string; + 'ွတ်': string; + 'ေတ်': string; + 'ဒ်': string; + 'ိုဒ်': string; + 'ုဒ်': string; + 'န်': string; + 'ာန်': string; + 'ိန်': string; + 'ုန်': string; + 'ွန်': string; + 'ပ်': string; + 'ိပ်': string; + 'ုပ်': string; + 'ွပ်': string; + 'န်ုပ်': string; + 'မ်': string; + 'ိမ်': string; + 'ုမ်': string; + 'ွမ်': string; + 'ယ်': string; + 'ိုလ်': string; + 'ဉ်': string; + 'ံ': string; + 'ိံ': string; + 'ုံ': string; + 'ައް': string; + 'ަށް': string; +}; +/** + * langCharMap language specific characters translations + * @type {Object} + */ +export declare const langCharMap: { + 'en': {}; + 'az': { + 'ç': string; + 'ə': string; + 'ğ': string; + 'ı': string; + 'ö': string; + 'ş': string; + 'ü': string; + 'Ç': string; + 'Ə': string; + 'Ğ': string; + 'İ': string; + 'Ö': string; + 'Ş': string; + 'Ü': string; + }; + 'cs': { + 'č': string; + 'ď': string; + 'ě': string; + 'ň': string; + 'ř': string; + 'š': string; + 'ť': string; + 'ů': string; + 'ž': string; + 'Č': string; + 'Ď': string; + 'Ě': string; + 'Ň': string; + 'Ř': string; + 'Š': string; + 'Ť': string; + 'Ů': string; + 'Ž': string; + }; + 'fi': { + 'ä': string; + 'Ä': string; + 'ö': string; + 'Ö': string; + }; + 'hu': { + 'ä': string; + 'Ä': string; + 'ö': string; + 'Ö': string; + 'ü': string; + 'Ü': string; + 'ű': string; + 'Ű': string; + }; + 'lt': { + 'ą': string; + 'č': string; + 'ę': string; + 'ė': string; + 'į': string; + 'š': string; + 'ų': string; + 'ū': string; + 'ž': string; + 'Ą': string; + 'Č': string; + 'Ę': string; + 'Ė': string; + 'Į': string; + 'Š': string; + 'Ų': string; + 'Ū': string; + }; + 'lv': { + 'ā': string; + 'č': string; + 'ē': string; + 'ģ': string; + 'ī': string; + 'ķ': string; + 'ļ': string; + 'ņ': string; + 'š': string; + 'ū': string; + 'ž': string; + 'Ā': string; + 'Č': string; + 'Ē': string; + 'Ģ': string; + 'Ī': string; + 'Ķ': string; + 'Ļ': string; + 'Ņ': string; + 'Š': string; + 'Ū': string; + 'Ž': string; + }; + 'pl': { + 'ą': string; + 'ć': string; + 'ę': string; + 'ł': string; + 'ń': string; + 'ó': string; + 'ś': string; + 'ź': string; + 'ż': string; + 'Ą': string; + 'Ć': string; + 'Ę': string; + 'Ł': string; + 'Ń': string; + 'Ó': string; + 'Ś': string; + 'Ź': string; + 'Ż': string; + }; + 'sv': { + 'ä': string; + 'Ä': string; + 'ö': string; + 'Ö': string; + }; + 'sk': { + 'ä': string; + 'Ä': string; + }; + 'sr': { + 'љ': string; + 'њ': string; + 'Љ': string; + 'Њ': string; + 'đ': string; + 'Đ': string; + }; + 'tr': { + 'Ü': string; + 'Ö': string; + 'ü': string; + 'ö': string; + }; +}; +/** + * symbolMap language specific symbol translations + * translations must be transliterated already + * @type {Object} + */ +export declare const symbolMap: { + 'ar': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'az': {}; + 'ca': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'cs': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'de': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'dv': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'en': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'es': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'fa': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'fi': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'fr': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'ge': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'gr': {}; + 'hu': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'it': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'lt': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'lv': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'my': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'mk': {}; + 'nl': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'pl': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'pt': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'ro': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'ru': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'sk': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'sr': {}; + 'tr': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'uk': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; + 'vn': { + '∆': string; + '∞': string; + '♥': string; + '&': string; + '|': string; + '<': string; + '>': string; + '∑': string; + '¤': string; + }; +}; +export declare const uricChars: string; +export declare const uricNoSlashChars: string; +export declare const markChars: string; /** * Interface for the SpeakingURL options * @see {@link https://github.com/pid/speakingurl#usage} */ -interface speakingurlOptions { +export interface speakingurlOptions { /** * Character that replaces the whitespaces * @default '-' @@ -13,78 +520,74 @@ interface speakingurlOptions { * @default 'en' */ lang?: string | boolean; - /** * Converts symbols according to the 'lang' setting if true. Don't convert symbols if false * @default true */ symbols?: boolean; - - /** * Maintains case chars if true. Convert all chars to lower case if false * @default false */ maintainCase?: boolean; - - /** * converts input string to title-case if true. Omit the words from the array if array is given. * @default false */ - titleCase?: boolean | Array; - - + titleCase?: boolean | string[]; /** * Don't trim length if 0. Trim to max length while not breaking any words if greater or equal to 1. * @default 0 */ truncate?: number; - - /** * Allow additional characters if true. * Characters allowed: ";", "?", ":", "@", "&", "=", "+", "\$", ",", "/" * @default false */ uric?: boolean; - - /** * Allow additional characters if true. * Characters allowed: ";", "?", ":", "@", "&", "=", "+", "\$", "," * @default false */ uricNoSlash?: boolean; - - /** * Allow additional characters if true. * Characters allowed: "-", "_", ".", "!", "~", "*", "'", "(", ")" * @default false */ mark?: boolean; - - /** * custom map for translation if object provided. Add array chars to allowed charMap if array provided. * @default {} */ - custom?: Object | Array - + custom?: { + [key: string]: string; + } | string[]; } - - /** - * Determines slug from given input. - * @param {string} input string to convert - * @param {object|string} options configuration object or separator string - * @return {string} slug + * getSlug + * @param {string} input input string + * @param {object|string} opts config object or separator string/char + * @api public + * @return {string} sluggified string + */ +export declare const getSlug: (input: string, opts: string | speakingurlOptions) => string; +/** + * createSlug curried(opts)(input) + * @param {object|string} opts config object or input string + * @return {Function} function getSlugWithConfig() + **/ +export declare const createSlug: (opts: string | {}) => (input: string) => string; +/** + * escape Chars + * @param {string} input string */ -declare function getSlug(input: string, options?: speakingurlOptions | string): string; - +export declare const escapeChars: (input: string) => string; /** - * @function createSlug - * @param {object|string} options configuration object or separator string + * check if the char is an already converted char from custom list + * @param {char} ch character to check + * @param {object} customReplacements custom translation map */ -declare function createSlug(options?: speakingurlOptions | string): ((input: string) => string); +export declare const isReplacedCustomChar: (ch: string, customReplacements: {}) => boolean;