Commit Graph

18 Commits (master)

Author SHA1 Message Date
Antti Pihlaja da62ae6713 allow inserting falsy values, excluding undefined 7 years ago
Tobias Peters f7a90694bd unit test and adjustments for using optional parameter with a trailing slash 9 years ago
Denis Sokolov 5cc5e5a249 Encode parameter values to allow slashes in values, fix #15 9 years ago
Denis Sokolov 824d69fd08 Remove global state, return rules directly
This breaks backwards compatibility.

This removes .routes because it's not intuitive what the result value
of that must be, and users are free to .map over .route themselves.

Also, .routes was never tested.

Fixes #14.
9 years ago
Tobias Peters 3fa59e012a fix for issue #11
get the keys by a simple regexp
9 years ago
Johannes J. Schmidt bc9dff9d4c Fixed named parameter followed by optional parameter 10 years ago
Johannes J. Schmidt e751d71494 Fix surrounded optional parameter 10 years ago
Johannes J. Schmidt b8e5739e1a Completely new routing engine. 10 years ago
Johannes J. Schmidt 92ef468220 allow removing of components in merge via undefined or null 10 years ago
Johannes J. Schmidt d0b80ee391 we do not need no arity 10 years ago
Johannes J. Schmidt ac4af0f980 (fixes #8) - Make it work as CouchDB CommonJS
Do not export a function.
`docuri()` is now called `docuri.definition()`.
10 years ago
Johannes J. Schmidt 4da8a2b0a2 (closes #7) - implements arity and parts
`docuri.parts` array of components, without trailing `undefined` components
`docuri.arity` length of parts.
10 years ago
Johannes J. Schmidt 6c88aa2372 configurable parts 10 years ago
Johannes J. Schmidt ed9f5886e8 rewrite 10 years ago
Johannes J. Schmidt 461c7ee0db change sequence of version and index
Before this api breaking change a docuri looked like this:
`type/id/subtype/version/index`
Now we swapped version and index:
`type/id/subtype/index/version`
10 years ago
andi pieper 958edbc693 added merge ability 10 years ago
Karsten Gebbert c584f201fe allow 0 as path element (closes #2) 10 years ago
Johannes J. Schmidt 55f7a6715a first commit 10 years ago