New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mondongo

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mondongo

A simple module for describe databases and collections of mongodb.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-86.67%
Maintainers
1
Weekly downloads
 
Created
Source

Mondongo

A simple module for describe databases and collections of mongodb.

Feactures:

  • Describe databases
  • Connect to database
  • Get collections list

This is on GitHub

Installation

$ [sudo] npm install mondongo --save

Usage

var mondongo = require('mondongo');

// Connection URL
var url = 'mongodb://localhost:27017/blog_db';

mondongo.describe(url).then((described) => {
  console.log("Output:\n", JSON.stringify(described, null, 4));
});

Example output (json)

[
 {
   "collection": "entrada",  // collection name
   "keys": [
     "_id",
     "titulo",
     "cuerpo",
     "fondo",
     "resumen",
     "oculto",
     "eliminado",
     "categoria_entrada_ref",
     "entrada_usuario",
     "createdAt",
     "updatedAt"
    ],
    "count": 11,            // number of keys
    "describe": [{
       "key": "_id",
       "type": "object",    // type: object, string, number, boolean...
       "isID": true         // is an identifier? ==> true | false
       }, {
       "key": "titulo",
       "type": "string"
       }, {
       "key": "cuerpo",
       "type": "string"
       }, {
       "key": "fondo",
       "type": "string"
       }, {
       "key": "resumen",
       "type": "string"
       }, {
       "key": "oculto",
       "type": "boolean"
       }, {
       "key": "eliminado",
       "type": "boolean"
       }, {
       "key": "categoria_entrada_ref",
       "type": "object",
       "isID": true
       }, {
       "key": "entrada_usuario",
       "type": "object",
       "isID": true
       }, {
       "key": "createdAt",
       "type": "date"
       }, {
       "key": "updatedAt",
       "type": "date"
       }
     ]
   },
   ...   //others collections
]

Keywords

FAQs

Package last updated on 22 Jul 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc