hookrouter icon indicating copy to clipboard operation
hookrouter copied to clipboard

Support underscores?

Open gilbert opened this issue 5 years ago • 3 comments

I spent a while figuring out why my route wasn't working. It turns out the problem was hookrouter didn't fully recognize /docs/:doc_id as does not support underscores.

Since most routing libraries support them, would you be in favor of allowing them on hookrouter too?

Thanks for this great, simple library.

gilbert avatar Dec 14 '19 21:12 gilbert

I made a note to put that in with v 2.0. In the meantime: how about using camel case? docId should work fine.

Paratron avatar Dec 15 '19 08:12 Paratron

@Paratron wow, is there a v2 on the road? Can't wait for that. I love this lib with some worry about the long-time-no-updating.

zhaoyao91 avatar Dec 16 '19 16:12 zhaoyao91

In the meantime: how about using camel case?

Yup, that's what I ended up doing. Didn't mean to imply it was a blocker. Thanks!

gilbert avatar Dec 16 '19 19:12 gilbert