Skip to main content
Home

Built and signed on GitHub Actions

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
70%
Published
2 years ago (0.3.2)
class Unicode

Constructors

new
Unicode(
charRange: unicode.UnicodeRangeTable[],
surrogateRange?: unicode.UnicodeSurrogateRangeTable[],
)

Properties

charRange: unicode.UnicodeRangeTable[]
charSurrogateRange: unicode.UnicodeSurrogateRangeTable[]
fastTable: CharCategory[]
fullTable: CharCategoryMap
surrogateMap: { [code: number]: CharCategoryMap; }

Methods

private
_buildSurrogateTables(): void

_buildTables constructs the surrogate unicode tables with the initialization set.

private
_buildTables(fastOnly: boolean): void

_buildTables constructs the non-surrogate unicode tables with the initialization set.

private
_lookupSurrogate(
char: number,
nextChar: number,
): boolean

checks the surrogate map/table if this character is a member

This will detect if a character is a surrogate char

lookup(
char: number,
nextChar?: number,
): boolean

lookup checks of the character is a member of the initializing unicode categories.

Static Methods

is this a binary char

is this a hex char, case in-sensitive

is this char a decimal number

is this a octal char

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:@kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";
or

Import directly with a jsr specifier

import { Unicode } from "jsr:@kgwinnup/unicode";

Add Package

pnpm i jsr:@kgwinnup/unicode
or (using pnpm 10.8 or older)
pnpm dlx jsr add @kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";

Add Package

yarn add jsr:@kgwinnup/unicode
or (using Yarn 4.8 or older)
yarn dlx jsr add @kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";

Add Package

vlt install jsr:@kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";

Add Package

npx jsr add @kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";

Add Package

bunx jsr add @kgwinnup/unicode

Import symbol

import { Unicode } from "@kgwinnup/unicode";