gab-social/app/javascript/gabsocial/utils/unslugify.js
mgabdev fafd1ef658 Added pages and routes for Groups by tag and category
• Added:
- pages and routes for Groups by tag and category
2020-09-14 17:12:45 -05:00

8 lines
283 B
JavaScript

// https://github.com/danny-wood/unslugify/blob/master/index.js
export default function unslugify(text) {
const result = `${text}`.replace(/\-/g, " ");
return result.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}