Use colon as _id property separator
Per https://github.com/eHealthAfrica/couchdb-best-practices/issues/39. Perhaps even make it configurable?
Since : was used for named params before, this change requires a bigger effort and may introduce breaking changes.
I would suggest that we use Template Strings for named params.
I think this change would make docuri less intuitive, since it breaks the router analogy. But the project can also yield when this is taken as an incentive to rethink the api.
It seems the problems with / are realistic enough to do something about it.
But the user experience of describing routes as URL routes is very important.
Among other things, it intuitively suggests a good design for routes, mirroring REST practices.
Here's a suggestions: perhaps we do not need to actually have the API and the implementation to match. After all, if one uses docuri properly, the use of slashes is a purely internal detail.
Consider the API that uses slashes: docuri.route('/items/:id'), but actually produces :items:23 when asked to build a path.
This is a controversial idea, let me know what you think.
I like it!
+1