Tags for TS.
Example 1
import { addTag, removeTag,type TagsInterface } from "./mod.ts"; const taggable: TagsInterface = { tags: undefined }; assert(getTag(taggable, "hello") == null, "should not have tags yet"); addTag(taggable, "hello", "world"); assert(getTag(taggable, "hello") == "world", "Expecting a value."); const v = removeTag(taggable, "hello"); assert(v == "world", "should have removed world was: " + v); assert(getTag(taggable, "hello") == null, "should no longer have tags");
Add Package
deno add jsr:@stsoftware/tags
Import symbol
import * as tags from "@stsoftware/tags";
---- OR ----
Import directly with a jsr specifier
import * as tags from "jsr:@stsoftware/tags";
Add Package
npx jsr add @stsoftware/tags
Import symbol
import * as tags from "@stsoftware/tags";
Add Package
yarn dlx jsr add @stsoftware/tags
Import symbol
import * as tags from "@stsoftware/tags";
Add Package
pnpm dlx jsr add @stsoftware/tags
Import symbol
import * as tags from "@stsoftware/tags";
Add Package
bunx jsr add @stsoftware/tags
Import symbol
import * as tags from "@stsoftware/tags";