Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amerharb committed Jan 5, 2024
1 parent ba2a34f commit acb22a1
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
92 changes: 46 additions & 46 deletions packages/abjad-convert/src/ConverterFactory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Abjad } from './types'
import { IConvert } from './IConvert'
import { ArabicToImperialAramaicConverter } from "./arabic/toImperialAramaic";
import { ArabicToImperialAramaicConverter } from './arabic/toImperialAramaic'
import { ArabicToPhoenicianConverter } from './arabic/toPhoenician'
import { ArabicToUgariticConverter } from './arabic/toUgaritic'
import { ImperialAramaicToArabicConverter } from "./imperialAramaic/toArabic";
import { ImperialAramaicToPhoenicianConverter } from "./imperialAramaic/toPhoenician";
import { ImperialAramaicToUgariticConverter } from "./imperialAramaic/toUgaritic";
import { ImperialAramaicToArabicConverter } from './imperialAramaic/toArabic'
import { ImperialAramaicToPhoenicianConverter } from './imperialAramaic/toPhoenician'
import { ImperialAramaicToUgariticConverter } from './imperialAramaic/toUgaritic'
import { PhoenicianToArabicConverter } from './phoenician/toArabic'
import { PhoenicianToImperialAramaicConverter } from './phoenician/toImperialAramaic'
import { PhoenicianToUgariticConverter } from './phoenician/toUgaritic'
Expand All @@ -15,52 +15,52 @@ import { UgariticToPhoenicianConverter } from './ugaritic/toPhoenician'

export function getConverter(from: Abjad, to: Abjad): IConvert {
switch (from) {
case Abjad.Arabic:
switch (to) {
case Abjad.ImperialAramaic:
return new ArabicToImperialAramaicConverter()
case Abjad.Phoenician:
return new ArabicToPhoenicianConverter()
case Abjad.Ugaritic:
return new ArabicToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
case Abjad.Arabic:
switch (to) {
case Abjad.ImperialAramaic:
return new ArabicToImperialAramaicConverter()
case Abjad.Phoenician:
return new ArabicToPhoenicianConverter()
case Abjad.Ugaritic:
switch (to) {
case Abjad.Arabic:
return new UgariticToArabicConverter()
case Abjad.ImperialAramaic:
return new UgariticToImperialAramaicConverter()
case Abjad.Phoenician:
return new UgariticToPhoenicianConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
return new ArabicToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
case Abjad.Ugaritic:
switch (to) {
case Abjad.Arabic:
return new UgariticToArabicConverter()
case Abjad.ImperialAramaic:
return new UgariticToImperialAramaicConverter()
case Abjad.Phoenician:
switch (to) {
case Abjad.Arabic:
return new PhoenicianToArabicConverter()
case Abjad.ImperialAramaic:
return new PhoenicianToImperialAramaicConverter()
case Abjad.Ugaritic:
return new PhoenicianToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
case Abjad.ImperialAramaic: {
switch (to) {
case Abjad.Arabic:
return new ImperialAramaicToArabicConverter()
case Abjad.Phoenician:
return new ImperialAramaicToPhoenicianConverter()
case Abjad.Ugaritic:
return new ImperialAramaicToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
return new UgariticToPhoenicianConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
case Abjad.Phoenician:
switch (to) {
case Abjad.Arabic:
return new PhoenicianToArabicConverter()
case Abjad.ImperialAramaic:
return new PhoenicianToImperialAramaicConverter()
case Abjad.Ugaritic:
return new PhoenicianToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
case Abjad.ImperialAramaic: {
switch (to) {
case Abjad.Arabic:
return new ImperialAramaicToArabicConverter()
case Abjad.Phoenician:
return new ImperialAramaicToPhoenicianConverter()
case Abjad.Ugaritic:
return new ImperialAramaicToUgariticConverter()
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
}
default:
throw new Error(`No converter exists from ${Abjad[from]} to ${Abjad[to]}`)
}
}
2 changes: 1 addition & 1 deletion packages/abjad-convert/src/ugaritic/toImperialAramaic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IConvert } from '../IConvert'
import { Abjad } from '../types'
import { UgariticToArabicConverter } from './toArabic'
import { ArabicToImperialAramaicConverter } from "../arabic/toImperialAramaic";
import { ArabicToImperialAramaicConverter } from '../arabic/toImperialAramaic'

export class UgariticToImperialAramaicConverter implements IConvert {
public readonly from = Abjad.Ugaritic
Expand Down

0 comments on commit acb22a1

Please sign in to comment.