2727// =>
2828{ input: ' /hello/awesome/10.10/?you=matter' ,
2929 path: ' /hello/:there/:you(\\ d+)' ,
30- stems : [' /hello' , ' /awesome' ,' /10.10' ],
30+ argv : [' /hello' , ' /awesome' ,' /10.10' ],
3131 url:
3232 { href: ' /hello/awesome/10.10/?you=matter' ,
3333 hash: null ,
4949// =>
5050{ input: ' hello.awesome.human' ,
5151 path: ' hello.:there(\\ w+).:you' ,
52- stems : [' hello.' , ' awesome.' , ' human' ],
52+ argv : [' hello.' , ' awesome.' , ' human' ],
5353 depth: 2 ,
5454 regexp: / ^ hello\. (\w + )\. ([^ \. ] + )/ i ,
5555 notFound: false ,
6464 // =>
6565{ input: ' /hello/there/you/awesome' ,
6666 path: ' /hello/:there/:you(\\ w+)' ,
67- stems : [' /hello' , ' /there' , ' /you' , ' /awesome' ],
67+ argv : [' /hello' , ' /there' , ' /you' , ' /awesome' ],
6868 url:
6969 { href: ' /hello/there/you/awesome' ,
7070 hash: null ,
8585// =>
8686{ input: ' get page.data /hello/there/awesome.json?page=10' ,
8787 path: ' :method(get|put|delete|post) :model.data /hello/:one/:two' ,
88- stems : [' get' , ' page.' , ' data' , ' /hello' , ' /there' , ' /awesome.json' ],
88+ argv : [' get' , ' page.' , ' data' , ' /hello' , ' /there' , ' /awesome.json' ],
8989 url:
9090 { href: ' /hello/there/awesome.json?page=10' ,
9191 hash: null ,
@@ -123,7 +123,7 @@ arguments
123123- ` opts ` type ` object ` holding all extra information
124124
125125return
126- - ` opts.stems ` array with the normalized path
126+ - ` opts.argv ` array with the normalized path
127127
128128After the function call, all properties are available at the object passed to ` opts ` .
129129
@@ -164,7 +164,7 @@ return
164164 object with properties below
165165- ` input ` : the given input
166166- ` path ` : normalized path set (no querystring or hash and sanitized)
167- - ` stems ` : ` array ` version of the normalized path
167+ - ` argv ` : ` array ` version of the normalized path
168168- ` url ` : url contained in the matched path, object with properties
169169 - href: complete path
170170 - query: querystring without the '?' sign
@@ -188,7 +188,7 @@ parth
188188console .log (op);
189189 { input: ' my paths on fire' ,
190190 path: ' my paths on fire' ,
191- stems : [ ' my' , ' paths' , ' on' , ' fire' ],
191+ argv : [ ' my' , ' paths' , ' on' , ' fire' ],
192192 depth: null ,
193193 index: - 1 ,
194194 found:
0 commit comments