https://github.com/denosaurs/urlpattern
๐ A polyfill for URLPattern for web-browsers, older versions of deno and non-unstable deno
https://github.com/denosaurs/urlpattern
deno rust typescript urlpattern
Last synced: 1 day ago
JSON representation
๐ A polyfill for URLPattern for web-browsers, older versions of deno and non-unstable deno
- Host: GitHub
- URL: https://github.com/denosaurs/urlpattern
- Owner: denosaurs
- License: mit
- Created: 2021-09-08T14:34:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T10:03:10.000Z (over 3 years ago)
- Last Synced: 2025-06-04T21:55:38.940Z (28 days ago)
- Topics: deno, rust, typescript, urlpattern
- Language: TypeScript
- Size: 1000 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# URLPattern polyfill
This module is a polyfill implementing the
[`URLPattern` web API](https://github.com/WICG/urlpattern) api in wasm and js.
We use the crate [rust-urlpattern](https://github.com/denoland/rust-urlpattern)
from [denoland](https://github.com/denoland/rust-urlpattern) which is the same
as is used internally in the deno runtime.The module works both in deno (for when the `unstable` flag is not passed as is
the case until the deno api is stabilized) and in the browser.## Usage
Using `URLPattern` is as simple as:
```ts
import { URLPattern } from "https://deno.land/x/urlpattern/mod.ts";const pattern = new URLPattern("/:some/:pattern", "https://example.com/some/pattern)
```Or in case you want to automatically register the `URLPattern` object globally
to the `window` object (in case it does not already exist):```ts
import "https://deno.land/x/urlpattern/auto.ts";const pattern = new URLPattern("/:some/:pattern", "https://example.com/some/pattern)
```## Maintainers
- Elias Sjรถgreen ([@eliassjogreen](https://github.com/eliassjogreen))
## Other
### Contribution
Pull request, issues and feedback are very welcome. Code style is formatted with
`deno fmt` and commit messages are done following Conventional Commits spec.### Licence
Copyright 2021, the denosaurs team. All rights reserved. MIT license.