snd / url-pattern

easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.
MIT License
585 stars 43 forks source link

Fails when the pattern has a dot #50

Closed hacknlove closed 5 years ago

hacknlove commented 5 years ago

// https://repl.it/repls/DimpledExpensiveModule

const UrlPattern = require('url-pattern') const pattern = new UrlPattern('/foo/:bar')

console.log(pattern.match('/foo/something')) // Match

console.log(pattern.match('/foo/some.thing')) // Does not match

snd commented 5 years ago

hey @hacknlove,

i hope reading my answer to this similar issue will help you https://github.com/snd/url-pattern/issues/26

snd commented 5 years ago

this is working as expected. please read my answer in #26. closing