Function: renameTag()
renameTag(
tags,from,to):string[]
Defined in: packages/agentos/src/cognition/library/tags.ts:382
A list with every label of from's key written as to, each tag once, in the list's order: where the list holds
to's key too, the two become one to at the first place either stood, and any other key the list holds twice
keeps its first label. A label with no key (C++) is compared as
written, so renaming c leaves C++ where it stands. A list that holds no label of from comes back unchanged.
to is written as given; the host passes a label it accepts. Pure: the list given is not changed.
Parameters
tags
readonly string[]
from
string
to
string
Returns
string[]