Skip to main content
Home

Built and signed on GitHub Actions

Works with
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 Score100%
Downloads12/wk
Publisheda month ago (0.8.5)

🧙‍♀️ Magical regular expressions composer.

Coven Engineering Expression logo

JSR JSR Score

🧙‍♀️ Magical regular expressions composer.

It is really easy to mess big regular expressions by forgetting some character. So, instead of using plain strings, @coven/expression provides a set of functions and constants strongly typed, so the type is already a hardcoded string that reflects the regular expression being built, while giving an API that's easier to read and maintain.

Like all Coven Engineering libraries, it has 100% test coverage and it's built in top of modern tech compatible with all JavaScript runtimes.

Example

import { buildUnicode, disjunction, group } from "@coven/expression";

buildUnicode(group(disjunction("this", "that"))); // /(?:this|that)/u
Built and signed on
GitHub Actions

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:@coven/expression

Import symbol

import * as expression from "@coven/expression";
or

Import directly with a jsr specifier

import * as expression from "jsr:@coven/expression";

Add Package

pnpm i jsr:@coven/expression
or (using pnpm 10.8 or older)
pnpm dlx jsr add @coven/expression

Import symbol

import * as expression from "@coven/expression";

Add Package

yarn add jsr:@coven/expression
or (using Yarn 4.8 or older)
yarn dlx jsr add @coven/expression

Import symbol

import * as expression from "@coven/expression";

Add Package

vlt install jsr:@coven/expression

Import symbol

import * as expression from "@coven/expression";

Add Package

npx jsr add @coven/expression

Import symbol

import * as expression from "@coven/expression";

Add Package

bunx jsr add @coven/expression

Import symbol

import * as expression from "@coven/expression";