wrong/deprecated code on Docs
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 180
- PR merge metrics
- No merged PRs in 30d
Description
https://automattic.github.io/monk/docs/collection/findOne.html
I stumbled upon this just now. when you want to exclude a projection on a query you should use 0 , not -1.
ex.
```
//wrong use, the one in docs
users.findOne({name: 'foo'}, { projection: {name: -1} });
//right one
users.findOne({name: 'foo'}, { projection: {name: 0} });
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the linked collection/findOne.html documentation page and inspect the projection example. Compare the documented exclusion value with the issue's two examples, then update the example so the page no longer shows the deprecated form and confirm the rendered page displays the corrected snippet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100