Skip to content

Commit a65a58c

Browse files
author
Lucas Rocha
authored
Update README.md
1 parent b3be4c5 commit a65a58c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ app.use(qs({
151151
#### 3.6 Search
152152
| Query | Description | Result |
153153
| ------ | ------ | ------ |
154-
| `?name=elvis*`| Search where the user want results that the name starts with value 'elvis'. | `{ filters: { name: { '$options': 'i', '$regex': '^lucas' } } ` |
155-
| `?name=*elvis` | Search where the user want results that the name ends with the value 'elvis'. | `{ filters: { name: { '$options': 'i', '$regex': 'lucas&' } } ` |
156-
| `?name=*elvis*` | Search where the user wants results for name that contains the value 'elvis' in any position. | `{ filters: { name: { '$options': 'i', '$regex': 'lucas' } } ` |
154+
| `?name=elvis*`| Search where the user want results that the name starts with value 'elvis'. | `{ filters: { name: { '$options': 'i', '$regex': '^elvis' } } ` |
155+
| `?name=*elvis` | Search where the user want results that the name ends with the value 'elvis'. | `{ filters: { name: { '$options': 'i', '$regex': 'elvis&' } } ` |
156+
| `?name=*elvis*` | Search where the user wants results for name that contains the value 'elvis' in any position. | `{ filters: { name: { '$options': 'i', '$regex': 'elvis' } } ` |
157157

158158
**NOTES** :
159159
* Default values are used only when they are not passed in the query string. For example, if you set the default value `?sort=-age` _(age in descending order)_ and your client makes a request with `?sort=name` _(name in ascending order)_, you will get in req.query the value `{ sort: { name: 'asc' } }`, since the values passed by the client will always have preference.

0 commit comments

Comments
 (0)