Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

URLPattern for Deno

An easy and simple approach for URL patterns in Deno. Inspired by snd's url-pattern.

Usage

import { URLPattern } from 'https://deno.land/x/url_pattern/mod.ts'

const pattern = new URLPattern('/book/:id')
pattern.match('/book/')              // >>> null
pattern.match('/book/123')           // >>> { id: '123' }

const pattern2 = new URLPattern('*') // This will accept everything
pattern.match('')                    // >>> {}
pattern.match('/')                   // >>> {}

About

⚡ An easy and simple approach for URL patterns in Deno

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages