Skip to content

tjosepo/csharp-urlpattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URLPattern

This package implements the URLPattern web API in C#. We aim to follow the specification as closely as possible.

Example

using URLPatternWebApi;

// Create the URLPattern to match against.
var init = new URLPatternInit {
  Pathname = "/users/:id"
};
var pattern = new URLPattern(init);

// Match the pattern against a URL.
var url = "https://example.com/users/123";
var result = pattern.Exec(url);
Assert.Equal("123", result.Pathname.Groups["id"]);

Tests

To execute the tests, run:

cd ./test
dotnet watch test

About

C# implementation of the `URLPattern` web API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages