Skip to content

Commit

Permalink
refactor: remove unused findProtocol and findPort functions
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Eroglu <[email protected]>
  • Loading branch information
hasanheroglu committed Jul 21, 2024
1 parent 17d1090 commit fee7c56
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/td-tools/src/td-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@

import ThingDescription from "./thing-description";

// need two tests
export function findProtocol(td: ThingDescription): string {
const base: string = td.base;
const columnLoc: number = base.indexOf(":");
return base.substring(0, columnLoc);
}

export function findPort(td: ThingDescription): number {
const base: string = td.base;
const columnLoc: number = base.indexOf(":", 6);
const divLoc: number = base.indexOf("/", columnLoc);
const returnString: string = base.substring(columnLoc + 1, divLoc);
return parseInt(returnString);
}

export function setContextLanguage(thing: ThingDescription, language: string, forceOverride: boolean): void {
// forceOverride == false -> set @language if no @language set
// forceOverride == true -> set/override @language in any case
Expand Down

0 comments on commit fee7c56

Please sign in to comment.