1 | var toString = require('../lang/toString');
|
2 | var lowerCase = require('./lowerCase');
|
3 | var upperCase = require('./upperCase');
|
4 | /**
|
5 | * UPPERCASE first char of each word.
|
6 | */
|
7 | function properCase(str){
|
8 | str = toString(str);
|
9 | return lowerCase(str).replace(/^\w|\s\w/g, upperCase);
|
10 | }
|
11 |
|
12 | module.exports = properCase;
|
13 |
|