Skip to main content
Very Popular
Latest
method Collection.prototype.findOne
import { Collection } from "https://deno.land/x/mongo@v0.33.0/src/collection/collection.ts";

Find one Document using the given filter

Parameters

optional
filter: Filter<T>

The query used to match for a document

optional
options: FindOptions

Additional options for the operation

Returns

Promise<T | undefined>

The document matched, or undefined if no document was found