Skip to main content

Function: isTag()

isTag(text): boolean

Defined in: packages/agentos/src/cognition/library/tags.ts:98

Whether a text is a tag as stored or typed: NFC, lower case, runs with single hyphens between them, 1 to 40 code points, and a key of its own. Folding can leave a text no run or too many code points, so the key is asked for: U+FE70, an Arabic mark's isolated form, is a letter whose compatibility form is a space and a mark, and twenty U+FB03 ligatures fold to sixty letters. A text whose compatibility form keeps a run but drops a mark (Thai U+0E33) is a tag whose key differs from it.

Parameters​

text​

string

Returns​

boolean