Skip to content

Commit

Permalink
Merge pull request eclipse-thingweb#1308 from hasanheroglu/1307-repla…
Browse files Browse the repository at this point in the history
…ce-protocol-and-port-detection

refactor: remove unused findProtocol and findPort functions
  • Loading branch information
relu91 authored Jul 23, 2024
2 parents 8f69a3b + 901a3cb commit 15c5af7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/td-tools/src/td-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@

import ThingDescription from "./thing-description";

// need two tests
/**
* @deprecated This function will be removed in the future. Please use '@thingweb/td-utils' package instead.
*/
export function findProtocol(td: ThingDescription): string {
const base: string = td.base;
const columnLoc: number = base.indexOf(":");
return base.substring(0, columnLoc);
}

/**
* @deprecated This function will be removed in the future. Please use '@thingweb/td-utils' package instead.
*/
export function findPort(td: ThingDescription): number {
const base: string = td.base;
const columnLoc: number = base.indexOf(":", 6);
Expand Down

0 comments on commit 15c5af7

Please sign in to comment.