Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 months 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 (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T10:03:10.000Z (about 3 years ago)
- Last Synced: 2024-04-14T00:49:17.619Z (10 months ago)
- Topics: deno, rust, typescript, urlpattern
- Language: TypeScript
- Size: 1000 KB
- Stars: 11
- 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.