Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmeasday/cursor-utils
https://github.com/tmeasday/cursor-utils
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tmeasday/cursor-utils
- Owner: tmeasday
- Created: 2015-11-23T06:43:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-23T07:48:04.000Z (about 9 years ago)
- Last Synced: 2024-10-25T19:40:08.479Z (about 2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cursor Utils
Make a cursor more specific
```js
const cursor = Collection.find({some: 'query'}, {and: 'options'});// returns a new cursor with the intersection of both sets of query and options
CursorUtils.find(cursor, {some: 'additional'}, {query: 'and-options'});// as above but finds one
CursorUtils.findOne(cursor, {some: 'additional'}, {query: 'and-options'});// a common use case
CursorUtils.findOne(cursor);
```## Contributing
This project is a useful proof of concept. It still needs work!
1. Handling more query types (not just doing `_.extend()` on two objects)
2. Keeping sort from both queries
3. Completing the test suite
4. Unknown unknowns