File manager - Edit - /usr/local/lib/node_modules/bower/lib/node_modules/mout/src/string/slugify.js
Back
define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ /** * Convert to lower case, remove accents, remove non-word chars and * replace spaces with the specified delimeter. * Does not split camelCase text. */ function slugify(str, delimeter){ str = toString(str); if (delimeter == null) { delimeter = "-"; } str = replaceAccents(str); str = removeNonWord(str); str = trim(str) //should come after removeNonWord .replace(/ +/g, delimeter) //replace spaces with delimeter .toLowerCase(); return str; } return slugify; });
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings