Skip to content

Commit

Permalink
Deno engine
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Oct 19, 2024
1 parent 33b5f53 commit ab33815
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/advanced/[engine]/index.html/TestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function runTest(test_url:string, testInput: TestInput): Promise<TestOutpu
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
mode: "no-cors",
});
const data = await response.json();

Expand Down
62 changes: 62 additions & 0 deletions src/engines/deno.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { RegexEngine } from "./RegexEngine";

export const deno: RegexEngine = {
description: "RegExp Object",
enabled: true,
help_label: "MDN",
help_url:
"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
handle: "deno",
level: "beta",
links: {
"MDN RegExp Object":
"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp",
"MDN flags":
"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#advanced_searching_with_flags",
},
logo_icon: "https://www.vectorlogo.zone/logos/deno/deno-icon.svg",
logo_ar21: "https://www.vectorlogo.zone/logos/deno/deno-ar21.svg",
nodeping_url:
"https://nodeping.com/reports/checks/iajucfo0-kq0e-47ql-82sk-xoji0l2ejmfw",
notfound: ["javascript", "typescript"],
options: [
{
code: "d",
description: "Generate indices for substring matches. (hasIndices)",
},
{ code: "g", description: "Global search. (global)" },
{
code: "i",
description: "Case-insensitive search. (ignoreCase)",
portableCode: "ignorecase",
},
{
code: "m",
portableCode: "multiline",
description:
"Allows ^ and $ to match next to newline characters. (multiline)",
},
{
code: "s",
description: "Allows . to match newline characters. (dotAll)",
portableCode: "dotall",
},
{
code: "u",
description: `"Unicode"; treat a pattern as a sequence of Unicode code points. (unicode)`,
},
{
code: "v",
description:
"An upgrade to the u mode with more Unicode features. (unicodeSets)",
},
{
code: "y",
description: `Perform a "sticky" search that matches starting at the current position in the target string. (sticky)`,
},
],
short_name: "Deno",
source_url: "https://github.com/regexplanet/regexplanet-deno",
status_url: "https://deno.gcr.regexplanet.com/status.json",
test_url: "https://deno.gcr.regexplanet.com/test.json",
};
2 changes: 2 additions & 0 deletions src/engines/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { RegexEngine } from "./RegexEngine";

import { browser } from "./browser";
import { bun } from "./bun";
import { deno } from "./deno";
import { dotnet } from "./dotnet";
import { erlang } from "./erlang";
import { go } from "./go";
Expand All @@ -22,6 +23,7 @@ import { xregexp } from "./xregexp";
const engineMap = new Map<string, RegexEngine>([
[browser.handle, browser],
[bun.handle, bun],
[deno.handle, deno],
[erlang.handle, erlang],
[go.handle, go],
[haskell.handle, haskell],
Expand Down

0 comments on commit ab33815

Please sign in to comment.