* Decamelizes a string with/without a custom separator (hyphen by default). * from: https://ourcodeworld.com/articles/read/608/how-to-camelize-and-decamelize-strings-in-javascript * * @param str String in camelcase * @param separator Separator for the new decamelized string.
(str, separator = "-")
| 6643 | * @param str String in camelcase |
| 6644 | * @param separator Separator for the new decamelized string. |
| 6645 | */ function decamelize(str, separator = "-") { |
| 6646 | return str.replace(/([a-z\d])([A-Z])/g, "$1" + separator + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + separator + "$2").toLowerCase(); |
| 6647 | } |
| 6648 | function createElement(tag, attrs, ...children) { |
| 6649 | if (typeof tag === "function") { |
| 6650 | const fn = tag; |