mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
adfd titleCase
This commit is contained in:
parent
024808fa0d
commit
bdcc2c5de7
4
string/index.d.ts
vendored
4
string/index.d.ts
vendored
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user