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
4 months ago (1.0.6)
function addTag
addTag(
taggable: TagsInterface,
name: string,
value: string,
): string | null

Adds a tag to the given TagsInterface.

If a tag with the same name already exists, its value is updated.

Parameters

taggable: TagsInterface
  • The entity to which the tag will be added.
name: string
  • The name of the tag.
value: string
  • The value of the tag.

Return Type

string | null

The previous value of the tag if it was updated, or null if it was added.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@stsoftware/tags

Import symbol

import { addTag } from "@stsoftware/tags";

---- OR ----

Import directly with a jsr specifier

import { addTag } from "jsr:@stsoftware/tags";

Add Package

npx jsr add @stsoftware/tags

Import symbol

import { addTag } from "@stsoftware/tags";

Add Package

yarn dlx jsr add @stsoftware/tags

Import symbol

import { addTag } from "@stsoftware/tags";

Add Package

pnpm dlx jsr add @stsoftware/tags

Import symbol

import { addTag } from "@stsoftware/tags";

Add Package

bunx jsr add @stsoftware/tags

Import symbol

import { addTag } from "@stsoftware/tags";