| Number of watchers on Github | 1412 |
| Number of open issues | 18 |
| Average time to close an issue | 3 months |
| Main language | JavaScript |
| Average time to merge a PR | about 1 month |
| Open pull requests | 19+ |
| Closed pull requests | 12+ |
| Last commit | almost 2 years ago |
| Repo Created | over 7 years ago |
| Repo Last Updated | over 1 year ago |
| Size | 1.06 MB |
| Organization / Author | automattic |
| Latest Release | v6.0.0 |
| Contributors | 23 |
| Page Updated | 2018-03-15 |
| Do you use monk? Leave a review! | |
| View open issues (18) | |
| View monk activity | |
| View on github | |
| Fresh, new opensource launches 🚀🚀🚀 | |
|
Trendy new open source projects in your inbox!
View examples
|
|
note: monk 2.x drop the support for node < 0.12. If you are still using an earlier version, stick to monk 1.x
const db = require('monk')('localhost/mydb')
// or
// const db = require('monk')('user:pass@localhost:port/mydb')
const users = db.get('users')
users.index('name last')
users.insert({ name: 'Tobi', bigdata: {} })
users.find({ name: 'Loki' }, '-bigdata').then(function () {
// exclude bigdata field
})
users.find({}, {sort: {name: 1}}).then(function () {
// sorted by name field
})
users.remove({ name: 'Loki' })
db.close()
_id in queriescastIds is true by default for all queries)Most of the Monk's features are implemented as middleware.
There are a bunch of third-parties middlewares that add even more functionalities to Monk:
Created an nice middleware? Send a PR to add to the list!
MIT
remove now uses deleteOne or deleteMany under the hood (fix #178)mapReduce method (fix #167)geoHaystackSearch methodgeoNear methodstats method (fix #191)castIds. safe is not true by default anymore.rawCursor on the find method) so that the entire API has the same return type (a promise)