@contextjs/text
v25.1.0
Published
String manipulation utilities for ContextJS applications
Maintainers
Readme
@contextjs/text
String manipulation utilities for ContextJS applications
Features
- Chainable, immutable-safe
StringBuilderimplementation - Efficient string concatenation using segment arrays
- Support for insertion, removal, and replacement
- Fluent
appendFormat,appendLine,clear, andclonemethods - Implicit string conversion with
Symbol.toPrimitive - Test-driven and zero-runtime dependency
Installation
npm i @contextjs/textUsage Example
import { StringBuilder } from "@contextjs/text";
const builder = new StringBuilder();
builder
.append("Hello")
.append(", ")
.appendFormat("{0}!", "world");
console.log(builder.toString()); // "Hello, world!"API Reference
For detailed API documentation, please refer to the API Reference.
