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