diff --git a/voca/index.d.ts b/voca/index.d.ts index 95703b49ad..80056bf1d5 100644 --- a/voca/index.d.ts +++ b/voca/index.d.ts @@ -27,6 +27,7 @@ declare namespace v { kebabCase(subject?: string): string; lowerCase(subject?: string): string; snakeCase(subject?: string): string; + swapCase(subject?: string): string; titleCase(subject?: string, ignoreWords?: string[]): string; upperCase(subject?: string): string; @@ -126,6 +127,7 @@ declare namespace v { kebabCase(): Chain; lowerCase(): Chain; snakeCase(): Chain; + swapCase(): Chain; titleCase(ignoreWordsopt?: string[]): Chain; upperCase(): Chain; @@ -221,6 +223,7 @@ declare namespace v { kebabCase(): ExplicitChain; lowerCase(): ExplicitChain; snakeCase(): ExplicitChain; + swapCase(): ExplicitChain; titleCase(ignoreWordsopt?: string[]): ExplicitChain; upperCase(): ExplicitChain; diff --git a/voca/voca-tests.ts b/voca/voca-tests.ts index 532f7861a3..c4a342579c 100644 --- a/voca/voca-tests.ts +++ b/voca/voca-tests.ts @@ -23,6 +23,11 @@ str = v.decapitalize('Sun'); str = v.kebabCase('goodbye blue sky'); str = v.lowerCase('Green'); str = v.snakeCase('learning to fly'); + +str = v.swapCase('learning to fly'); +str = v('learning to fly').swapCase().value(); +str = v.chain('learning to fly').swapCase().value(); + str = v.titleCase('learning to fly'); str = v.titleCase('another brick in the wall', ['in', 'the']); str = v.upperCase('school');