adfd titleCase

This commit is contained in:
Luca Martinetti 2016-10-12 16:37:11 -07:00
parent 024808fa0d
commit bdcc2c5de7
2 changed files with 7 additions and 1 deletions

4
string/index.d.ts vendored
View File

@ -71,7 +71,7 @@ interface StringJS {
replaceAll(ss: string, newStr: string): StringJS;
strip(...strings: string[]): StringJS;
stripLeft(...strings: string[]): StringJS;
stripRight(...strings: string[]): StringJS;
@ -92,6 +92,8 @@ interface StringJS {
times(n: number): StringJS;
titleCase(): StringJS;
toBoolean(): boolean;
toCSV(delimiter?: string, qualifier?: string): StringJS;

View File

@ -209,6 +209,10 @@ console.log(S(str).template(values).s) //'Hello JP! How are you doing during the
S(' ').times(5).s //' '
S('*').times(3).s //'***'
S('Like ice in the sunshine').titleCase().s // 'Like Ice In The Sunshine'
S('data_rate').titleCase().s // 'Data_Rate'
S('background-color').titleCase().s // 'Background-Color'
S('true').toBoolean() //true
S('false').toBoolean() //false
S('hello').toBoolean() //false