Skip to content

Commit 26c6933

Browse files
committed
fix: add documentation for deno and bun
1 parent 9d3cf91 commit 26c6933

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
A WebAssembly build of [Rust Regex](https://docs.rs/regex/latest/regex/) for Javascript
44

5+
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/2fd/rregex/release.yml?branch=master) ![GitHub Release](https://img.shields.io/github/v/release/2fd/rregex) ![NPM Version](https://img.shields.io/npm/v/rregex)
6+
![JSR Version](https://img.shields.io/jsr/v/%40rregex/rregex)
7+
58
> Note: this project is not intended to be used in production jet
69
710
- [Why Rust Regex](#why-rust-regex)
811
- [Install](#install)
12+
- [Supported Runtimes](#supported-runtimes)
913
- [API](https://tsdocs.dev/docs/rregex/latest)
1014
- [`RRegex`](https://tsdocs.dev/docs/rregex/latest/classes/RRegex.html)
1115
- [`RRegexSet`](https://tsdocs.dev/docs/rregex/latest/classes/RRegexSet.html)
@@ -23,9 +27,37 @@ Rust has a powerful Regex library with a lot of features that don't exists en th
2327
## Install
2428

2529
```bash
26-
npm install rregex
30+
# NPM
31+
npm install rregex
32+
33+
# Yarn
34+
yarn add rregex
35+
36+
# PNPM
37+
pnpm add rregex
38+
39+
# Deno
40+
deno add @rregex/rregex
41+
42+
# JSR
43+
npx jsr add @rregex/rregex
2744
```
2845

46+
## Supported Runtimes
47+
48+
This package includes builds for multiple runtimes
49+
50+
| Runtime | File |
51+
| ------------------ | ----------------------------------------------- |
52+
| Node.js (esm) | [`lib/esm.mjs` (default)](./test/node.test.mjs) |
53+
| Node.js (commonjs) | [`lib/commonjs.cjs`](./test/node.test.cjs) |
54+
| Deno | [`lib/esm.mjs`](./test/deno.test.mjs) |
55+
| Bun | [`lib/esm.mjs`](./test/bun.test.mjs) |
56+
| Cloudflare Workers | TODO |
57+
| Browser | TODO |
58+
| Standalone | TODO |
59+
| Typescript | `lib/types.d.ts` |
60+
2961
## Known Issues
3062

3163
If you call `splitn(text, limit)` and the expected result length is equal to `limit - 1` the result will include an extra item `""`, this behavior does not happen if `limit` es greater. **`fixed at >=1.3`**

0 commit comments

Comments
 (0)