Socket
Socket
Sign inDemoInstall

then-mongo

Package Overview
Dependencies
44
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    then-mongo

Promise based mongo driver built on mongojs


Version published
Weekly downloads
127
increased by41.11%
Maintainers
2
Install size
6.48 MB
Created
Weekly downloads
 

Readme

Source

then-mongo

Promise based mongo driver built on mongojs

Build Status Dependency Status NPM version

Installation

npm install then-mongo

Usage

Emulates the offical mongo api as far as is possible, except that the result of every operation is a promise, rather than being synchronous.

var mongo = require('then-mongo');
var db = mongo('connection-string', ['collectionA', 'collectionB']);

db.collectionA.find().skip(5).limit(10)
  .done(function (results) {
    console.dir(results);
  });

API

Exports a function connect(connectionString, collections?, options?) and returns an instance of Database. If you pass in a list of collection names, then you can access each Collection as a property of the Database instance.

License

MIT

Keywords

FAQs

Last updated on 23 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc