From 4b90ff3ff5fc71aba903f10b78ae5e35f355ca1c Mon Sep 17 00:00:00 2001 From: Hasan Eroglu Date: Mon, 22 Jul 2024 14:23:01 +0200 Subject: [PATCH] refactor(td-tools): deprecate findProtocol and findPort Signed-off-by: Hasan Eroglu --- packages/td-tools/src/td-helpers.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/td-tools/src/td-helpers.ts b/packages/td-tools/src/td-helpers.ts index 521e1b78e..7fa33bc61 100644 --- a/packages/td-tools/src/td-helpers.ts +++ b/packages/td-tools/src/td-helpers.ts @@ -23,13 +23,20 @@ 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);