mongodb-utils
Advanced tools
Comparing version
@@ -47,3 +47,3 @@ const { ObjectID, Collection } = require('mongodb') | ||
find: function (query, options) { | ||
const cursor = mongoCollection.find(query) | ||
const cursor = mongoCollection.find(getQueryFromArguments(query)) | ||
@@ -50,0 +50,0 @@ options = options || {} |
{ | ||
"name": "mongodb-utils", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Utils for mongodb for nodejs", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
@@ -26,6 +26,6 @@ # mongodb-utils | ||
// We can now access to mongodb-utils method from .utils | ||
const user = await mongoUtils.utils.get({ usermane: 'terrajs' }) | ||
const user = await collection.utils.get({ usermane: 'terrajs' }) | ||
``` | ||
## Utils | ||
## Methods | ||
@@ -35,3 +35,3 @@ ### get | ||
```js | ||
get(query = { key: value } || string || ObjectID, fields = {}): Promise<doc> | ||
get(query = { key: value } || string || ObjectID, [fields]): Promise<doc> | ||
``` | ||
@@ -38,0 +38,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7879
0.28%1
Infinity%