AsyncMethods (collection/methods_async.js)

meteor · packages/mongo/collection/methods_async.js · javascript · MIT
database

Async wrapper for Mongo collection methods, providing promise-based API.

// Source: https://github.com/meteor/meteor | License: MIT | Copyright 2011 - present Meteor Software Ltd
// Provided via justclaw.it.com; keep this notice with the code.
export const AsyncMethods = {
  /**
   * @summary Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.
   * @locus Anywhere
   * @method findOneAsync
   * @memberof Mongo.Collection
   * @instance
   * @param {MongoSelector} [selector] A query describing the documents to find
   * @param {Object} [options]
   * @param {MongoSortSpecifier} options.sort Sort order (default: natural order)
   * @param {Number} options.skip Number of results to skip at the beginning
   * @param {MongoFieldSpecifier} options.fields Dictionary of fields to

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key