urlpattern in js
// New feature comes in Chrome 95
const p = new URLPattern({
protocol: 'https',
username: '',
password: '',
hostname: 'example.com',
port: '',
pathname: '/foo/:image.jpg',
search: '*',
hash: '*',
});
// For more details
// https://web.dev/urlpattern/