Skip to main content

Built and signed on GitHub Actions

A high-performance PartitionedBuffer implementation backed by Uint32Array for efficient memory usage and fast bitwise operations.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
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 (0.2.8)
function isValidName
isValidName(str: string): boolean

Test if a string is a valid name / label

Valid names are string between 1 and 255 characters, which match the VALID_NAME_PATTERN regex, and is not in the FORBIDDEN_NAMES set.

Parameters

the string to test

Return Type

true if the string is a valid name / label

Add Package

deno add jsr:@phughesmcr/partitionedbuffer

Import symbol

import { isValidName } from "@phughesmcr/partitionedbuffer";

---- OR ----

Import directly with a jsr specifier

import { isValidName } from "jsr:@phughesmcr/partitionedbuffer";

Add Package

npx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { isValidName } from "@phughesmcr/partitionedbuffer";

Add Package

yarn dlx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { isValidName } from "@phughesmcr/partitionedbuffer";

Add Package

pnpm dlx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { isValidName } from "@phughesmcr/partitionedbuffer";

Add Package

bunx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { isValidName } from "@phughesmcr/partitionedbuffer";