Files
bulma/docs/_react/bulma-customizer/src/utils.js
2024-06-25 22:20:37 +01:00

10 lines
260 B
JavaScript

export function unslug(slug) {
// Replace hyphens and underscores with spaces
let result = slug.replace(/[-_]/g, " ");
// Capitalize the first letter of each word
return result.replace(/\b\w/g, function (char) {
return char.toUpperCase();
});
}