Skip to main content

@std/text@1.0.8
Built and signed on GitHub Actions

Utilities for working with text

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
a month ago (1.0.8)

Utility functions for working with text.

import { toCamelCase, compareSimilarity } from "@std/text";
import { assertEquals } from "@std/assert";

assertEquals(toCamelCase("snake_case"), "snakeCase");

const words = ["hi", "help", "hello"];

// Words most similar to "hep" will be at the front
assertEquals(words.sort(compareSimilarity("hep")), ["help", "hi", "hello"]);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@std/text

Import symbol

import * as text from "@std/text";

---- OR ----

Import directly with a jsr specifier

import * as text from "jsr:@std/text";

Add Package

npx jsr add @std/text

Import symbol

import * as text from "@std/text";

Add Package

yarn dlx jsr add @std/text

Import symbol

import * as text from "@std/text";

Add Package

pnpm dlx jsr add @std/text

Import symbol

import * as text from "@std/text";

Add Package

bunx jsr add @std/text

Import symbol

import * as text from "@std/text";