Skip to content

Commit

Permalink
fix bug and update testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
vuongtq committed Apr 20, 2016
1 parent 8491af0 commit 10c335f
Show file tree
Hide file tree
Showing 9 changed files with 32,178 additions and 75 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ urlParser('http://example.com/terms/:termId/posts/:postId', {
```javascript
var urlParser = require('url_parser');

urlParser('http://example.com/terms/:termId/posts/:postId', {
urlParser('http://example.com/terms/:termId/posts', {
termId: 1,
postId: 2,
skip: 5,
take: 10,
}); // -> http://example.com/terms/1/posts/2?skip=5&take=10
}); // -> http://example.com/terms/1/posts?skip=5&take=10
```

# Client
Expand All @@ -57,14 +57,14 @@ console.log(url); // -> http://example.com/terms/1/posts/2
```

```javascript
var url = urlParser('http://example.com/terms/:termId/posts/:postId', {
var url = urlParser('http://example.com/terms/:termId/posts', {
termId: 1,
postId: 2,
skip: 5,
take: 10,
});

console.log(url); // -> http://example.com/terms/1/posts/2?skip=5&take=10
console.log(url); // -> http://example.com/terms/1/posts?skip=5&take=10
```

## Tests
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "url_parser",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "https://github.com/vuongtaquoc/url-parser",
"authors": [
"Ta Quoc Vuong <tqv.itvn@gmail.com>"
Expand Down

0 comments on commit 10c335f

Please sign in to comment.