Skip to content

hugoalh/url-regexp-es

URL RegExp (ES)

⚖️ MIT

GitHub: hugoalh/url-regexp-es JSR: @hugoalh/url-regexp NPM: @hugoalh/url-regexp

An ECMAScript module for URL regular expression.

This is a modified edition of the URL RegEx Safe which aim for:

  • ECMAScript
  • Not use of RE2
  • TypeScript first

🎯 Targets

Runtime \ Source GitHub Raw JSR NPM
Bun >= v1.1.0 ✔️ ✔️
Deno >= v2.1.0 ✔️ ✔️ ✔️
NodeJS >= v20.9.0 ✔️ ✔️

🛡️ Runtime Permissions

This does not request any runtime permission.

#️⃣ Sources

  • GitHub Raw
    https://raw.githubusercontent.com/hugoalh/url-regexp-es/{Tag}/mod.ts
    
  • JSR
    jsr:@hugoalh/url-regexp[@{Tag}]
    
  • NPM
    npm:@hugoalh/url-regexp[@{Tag}]
    

Note

  • It is recommended to include tag for immutability.
  • These are not part of the public APIs hence should not be used:
    • Benchmark/Test file (e.g.: example.bench.ts, example.test.ts).
    • Entrypoint name or path include any underscore prefix (e.g.: _example.ts, foo/_example.ts).
    • Identifier/Namespace/Symbol include any underscore prefix (e.g.: _example, Foo._example).

⤵️ Entrypoints

Name Path Description
. ./mod.ts Default.

🧩 APIs

  • function urlRegExp(options?: URLRegExpOptions): RegExp;
  • function urlRegExpSource(options?: URLRegExpOptions): string;

Note