Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fdebijl/mog

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fdebijl/mog

Opionated mini-ODM and collection of MongoDB utils 🔧

  • 1.6.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Mog

Opionated mini-ODM and collection of MongoDB utils. Mostly for use in my own projects but you might find it useful as a boilerplate ODM for small projects.

Installation:

npm install -S @fdebijl/mog

Usage:

Recommended usage is to have a file that exports a single instance of mog for use across an entire project. Simply import the configured instance of Mog in other files to use any of the exposed operations.

// mog.ts
import { Mog } from '@fdebijl/mog';

export const mog = new Mog({
  url: 'mongodb://mongodb0.example.com:27017',
  db: 'sample',
  appName: 'Sample app',
  defaultCollection: 'users'
});

// other-file.ts
import { mog } from './mog';

const user = await mog.get<User>({id: '125919258'});

FAQs

Package last updated on 25 Mar 2022

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