1.1.6 • Published 17 hours ago

@joshdb/mongo v1.1.6

Weekly downloads
9
License
Apache-2.0
Repository
github
Last release
17 hours ago

Josh Logo

@joshdb/mongo

A provider for @joshdb/core

GitHub npm

Description

Want to safely store your data in a mongo database? This is the package for you.

Features

  • Written in TypeScript
  • Offers CommonJS and ESM bundles
  • Fully tested

Installation

Using Yarn

yarn add @joshdb/mongo@next

Using NPM

npm i @joshdb/mongo@next

Provider Options

interface Options {
  /**
   * The name of the mongoose collection to use
   * @since 2.0.0
   */
  collectionName?: string;

  /**
   * Sanitize collection name
   * @since 2.0.0
   */
  enforceCollectionName?: boolean;

  /**
   * Authentication for the database in string or object
   * @since 2.0.0
   */
  authentication?: Partial<Authentication> | string;
}

interface Authentication {
  /**
   * The username for authentication.
   * @since 2.0.0
   */
  user?: string;
  /**
   * The password for authentication.
   * @since 2.0.0
   */
  password?: string;
  /**
   * The database name for authentication.
   * @since 2.0.0
   */
  dbName: string;
  /**
   * The database port for authentication.
   * @since 2.0.0
   */
  port: number;
  /**
   * The database host for authentication.
   * @since 2.0.0
   */
  host: string;
}
2.1.0

2 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago