Skip to content

Commit

Permalink
Do a bit of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
FinlayDaG33k committed Aug 20, 2023
1 parent 4c4e347 commit 8952997
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utility/inflector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ export class Inflector {
* Turn a string into PascalCase.
*
* @param input
* @param delimiter Optional delimiter by which to split the string
*/
public static pascalize(input: string, delimiter: string = '_'): string {
return Inflector
return this
.humanize(input, delimiter)
.replaceAll(' ', '');
}
Expand Down Expand Up @@ -56,7 +57,7 @@ export class Inflector {

// Uppercase each of the tokens
for(let i = 0; i < tokens.length; i++) {
tokens[i] = Inflector.ucfirst(tokens[i]);
tokens[i] = this.ucfirst(tokens[i]);
}

// Join tokens into a string and return
Expand Down

0 comments on commit 8952997

Please sign in to comment.