Skip to main content

Built and signed on GitHub Actions

TypeScript tagging

This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 months ago (1.0.6)

Tags

Tags for TS.

Examples

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");
Built and signed on
GitHub Actions
View transparency log

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";