Just wondering if there is anyway to specify a parameter as optional in a sammy js route.
I've seen somewhere that you can use
route/:foo/?:bar
and that will trick sammy into thinking that bar is optional. However if you query your params without bar
supplied you that it will equal the last character of the url for example
'#/route/test' => {foo: 'test', bar: 't'}
and
'/route/test/chicken' => {foo: 'test', bar: 'chicken' }
but with bar getting populated in both cases there is no way to check if its been supplied.
Any tips on this?