import { ICaseStyleConverter } from "./CaseStyleConverter" ; /**
 * Converts a series of words to PascalCase.
 */ export class PascalCaseConverter implements ICaseStyleConverter { param words returns public convert ( words ) { if ( words . length === 0 ) { return "" ; } let result = "" ; for ( let i = 0 ; i < words . length - 1 ; i += 1 ) { result += this . transformWord ( words [ i ] ) ; } result += this . transformWord ( words [ words . length - 1 ] ) ; return result ; } param word returns public transformWord ( word ) { return word [ 0 ] . toUpperCase ( ) + word . substring ( 1 ) . toLowerCase ( ) ; } }