Skip to main content

@gnome/char@0.0.0

The char package contains function to work with characters such as isUpper, isLower, isDigit, toLower, toUpper, isWhiteSpace, isAscii, isLatin1

Works with
JSR Score
70%
Published
3 weeks ago

In JavaScript, characters are represented as integers which can be returned by string functions charCodeAt and codePointAt.

The char module provides functions to evaluate characters (integers) such as isLetter, isLetterAt, isDigit, isWhitespace, isUpper, isLower.

Basic Usage

import { isUpperAt, isLowerAt, isDigit } from "@gnome/char/util";

const str = "Hello, World 123";
console.log(isUpperAt(str, 0)); // true
console.log(isUpperAt(str, 1)); // false
console.log(isLowerAt(str, 1)); // false
console.log(isDigit(str, 1)); // false 
console.log(isDigit(str, 14)); // true

License: MIT

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @gnome/char

Import symbol

import * as mod from "@gnome/char";

Add Package

npx jsr add @gnome/char

Import symbol

import * as mod from "@gnome/char";

Add Package

yarn dlx jsr add @gnome/char

Import symbol

import * as mod from "@gnome/char";

Add Package

pnpm dlx jsr add @gnome/char

Import symbol

import * as mod from "@gnome/char";

Add Package

bunx jsr add @gnome/char

Import symbol

import * as mod from "@gnome/char";