Utils.js 248 Bytes
Newer Older
d.arizona's avatar
d.arizona committed
1 2 3 4 5 6 7 8
export function titleCase(text) {
	var value = String(text).replace(/\./g, ' ')
		.replace(/\s/g, ' ')
		.replace(/^(.)/, function($1) { return $1.toUpperCase(); })
		// .replace(/\s(.)/g, function($1) { return $1.toUpperCase(); })

	return value
}