Skip to main content

@forest/key@1.1.0
Built and signed on GitHub Actions

Keys are a way to declare and specify objects without potential ambiguity or conflicts by assigning each key a namespace and a path

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
2 months ago (1.1.0)

A reference composed of a namespace and a path.

A namespace is a domain for content. It is to prevent potential content conflicts or unintentional overrides of objects of the same name.

The namespace and the path of a resource location should only contain the following symbols:

  • 0123456789 Numbers
  • abcdefghijklmnopqrstuvwxyz Lowercase letters
  • _ Underscore
  • - Hyphen/minus
  • . Dot

The following characters are illegal in the namespace, but acceptable in the path:

  • / Forward slash (directory separator)

The preferred naming convention for either namespace or path is snake_case.

Examples

Example 1

import { Key } from "@forest/key";

Key.key("kokiri", "forest").string // "kokiri:forest"
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@forest/key

Import symbol

import * as key from "@forest/key";

---- OR ----

Import directly with a jsr specifier

import * as key from "jsr:@forest/key";

Add Package

npx jsr add @forest/key

Import symbol

import * as key from "@forest/key";

Add Package

yarn dlx jsr add @forest/key

Import symbol

import * as key from "@forest/key";

Add Package

pnpm dlx jsr add @forest/key

Import symbol

import * as key from "@forest/key";

Add Package

bunx jsr add @forest/key

Import symbol

import * as key from "@forest/key";