function withoutTag
withoutTag(words: string[]): string[]

Removes the tag from a sentence

Creates a new word array without any .tag attribute.

Examples

Remove tag from sentence

import { assertEquals } from "@std/assert";
import { withoutTag } from "@hertzg/routeros-api/utils/tag";

const words = ["/interface/print", ".tag=abc123"];
const untagged = withoutTag(words);
assertEquals(untagged, ["/interface/print"]);

Remove from untagged sentence

import { assertEquals } from "@std/assert";
import { withoutTag } from "@hertzg/routeros-api/utils/tag";

const words = ["/interface/print"];
const untagged = withoutTag(words);
assertEquals(untagged, ["/interface/print"]);

Parameters

words: string[]

Array of words from a sentence

Return Type

string[]

New array without the tag word

Usage

import { withoutTag } from "utils/tag.ts";