mirror of
https://github.com/flarum/framework.git
synced 2025-02-11 15:11:46 +08:00
Clarify the use-case of the JS slug helper
This commit is contained in:
parent
a2cc49b1d9
commit
f22ba99214
|
@ -16,6 +16,10 @@ export function truncate(string, length, start = 0) {
|
||||||
* Create a slug out of the given string. Non-alphanumeric characters are
|
* Create a slug out of the given string. Non-alphanumeric characters are
|
||||||
* converted to hyphens.
|
* converted to hyphens.
|
||||||
*
|
*
|
||||||
|
* NOTE: This method does not use the comparably sophisticated transliteration
|
||||||
|
* mechanism that is employed in the backend. Therefore, it should only be used
|
||||||
|
* to *suggest* slugs that can be overridden by the user.
|
||||||
|
*
|
||||||
* @param {String} string
|
* @param {String} string
|
||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user