forked from DebaucheryLibrarian/traxxx
11 lines
223 B
JavaScript
11 lines
223 B
JavaScript
|
'use strict';
|
||
|
|
||
|
function capitalize(string) {
|
||
|
return string
|
||
|
.split(/\s/)
|
||
|
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
|
||
|
.join(' ');
|
||
|
}
|
||
|
|
||
|
module.exports = capitalize;
|