Clarify the use-case of the JS slug helper

This commit is contained in:
Franz Liedke 2020-01-24 17:42:14 +01:00
parent 64c702aaf7
commit f275bcdd2c
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

View File

@ -16,6 +16,10 @@ export function truncate(string, length, start = 0) {
* Create a slug out of the given string. Non-alphanumeric characters are
* 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
* @return {String}
*/