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

froncubator-mongo

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

froncubator-mongo

MongoDB library with typing and schema-models.

  • 0.0.1
  • npm
  • Socket score

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

froncubator-mongo

MongoDB library with typing and schema-models. https://github.com/froncubator/froncubator-mongo

Installation and Usage

npm install froncubator-mongo

// Quick Start
async main() {
    // Init library
    const db = new FroncubatorMongo()

    // Connect to MongoDB
    await db.connect('mongodb://user:password@ip_address:mongo_port/db_name', 'db_name')

    // Create schema with default values.
    // These values are used in the library for type checking.
    db.models.user = function() {
        return {
            firstName: '', // default values
            lastName: '',
            age: 0,
            interests: []
        }
    }

    // All FroncubatorMongo methods return {promise}
    await db.insert('user', {
        firstName: 'Jack',
        lastName: 'Black',
        age: 24,
        interests: ['beer', 'develop like a beast ;)', 'sleep']
    })
}

// ...
main()

MIT license.

Keywords

FAQs

Package last updated on 18 Jan 2018

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