mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-23 17:39:59 +00:00
10 lines
293 B
TypeScript
10 lines
293 B
TypeScript
import { capitalize } from '@ember/string';
|
|
|
|
/**
|
|
* Takes a string, returns a formatted string
|
|
* @param {string} string
|
|
*/
|
|
const formatAsCapitalizedStringWithSpaces = (string: string) => capitalize(string.toLowerCase().replace(/[_]/g, ' '));
|
|
|
|
export { formatAsCapitalizedStringWithSpaces };
|