bramstein/url-template — pull request #6 by oblador (2013-09-25 22:49:50+00:00)
Title: Omit undefined arguments in query string

The specification states that:

http://www.example.com/foo{?query,number}

would expand to

http://www.example.com/foo?query=mycelium&number=100

Alternatively, if 'query' is undefined, then the expansion would be

http://www.example.com/foo?number=100

or if both variables are undefined, then it would be

http://www.example.com/foo

Current implementation behaves like this:

```javascript
template.parse('/endpoint{?page,per_page}').expand({}) == '/endpoint?page=&per_page='
```
With this PR the url is a bit cleaner:
```javascript
template.parse('/endpoint{?page,per_page}').expand({}) == '/endpoint'
```