npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mongez/monpulse

v1.0.42

Published

Powerful Mongodb Database Manager for Node Js

Downloads

50

Readme

MonPulse

A powerful and easy to use MongoDB driver for Nodejs

Features

MonPulse is a MongoDB driver for Nodejs, it's built on top of the official MongoDB driver, and it provides a simple and easy to use API for working with MongoDB, it is fast, efficient, reliable and will make your life easier with real world apps.

Some but not all of the features:

  • Easy to use: MonPulse is very easy to use, it's just a wrapper around MongoDB driver.
  • Supports multiple connections: You can perform multiple connections to different MongoDB connections and use each one of them separately.
  • Supports multiple databases: MonPulse supports multiple databases, you can connect to multiple databases at the same time.
  • Powerful Aggregate framework: MonPulse has a powerful aggregate framework that helps you to perform complex queries.
  • Basic CRUD operations: MonPulse supports basic CRUD operations, you can perform create, read, update and delete operations.
  • Events Driven: MonPulse is events driven, you can listen to events and perform actions, for example before creating, updating or deleting a document.
  • Powerful Models: MonPulse has a powerful models system, a Model is a collection manager document based, it manages a collection's document easily with many utilities.
  • Learning curve: MonPulse has a very small learning curve, you can learn it in few minutes.
  • Pagination support: MonPulse supports pagination, you can paginate your results easily.
  • Output formatting: MonPulse supports output formatting, you can format your output easily when model is sent as a response.
  • Auto incremented id: MonPulse supports auto incremented id, you can use it as a primary key for your documents.
  • Random or sequential id: MonPulse supports random or sequential id.
  • Recycle Bin: Reduce collection documents by removing the document entirely from the collection, but move it to a separate collection trash.
  • Migration system: MonPulse has a migration system, you can create migrations and run them easily.
  • Data casting: You can cast your data to a specific type or using custom casting.
  • Embedded documents: MonPulse supports single and multiple embedded documents, you can embed documents inside other documents.
  • Syncing Models: Auto update documents when model's data is updated or deleted.

Installation

npm i @mongez/monpulse

Using yarn:

yarn add @mongez/monpulse

Using pnpm:

pnpm add @mongez/monpulse

Peek inside monpulse

Here is a simple example of defining a User model:

import { Model } from "@mongez/monpulse";

export class User extends Model {
  /**
   * The collection name
   * Must be defined explicitly.
   */
  public static collection = "users";
}

A quick example of creating a user:

import { User } from "src/models/user";

export async function createUser() {
  const user = await User.create({
    name: "Hasan Zohdy",
    email: "[email protected]",
  });

  console.log(user.data);
}

Outputs something similar to:

{
  "id": 1231412,
  "_id": "fagtrw43qwedasjoijwq",
  "name": "Hasan Zohdy",
  "email": "[email protected]",
  "createdAt": "2023-06-01 00:00:00",
  "updatedAt": "2023-06-01 00:00:00"
}

Documentation

To see the full documentation, please visit monpulse Documentation