# mongo-cruds

> A module to use all mongo crud operations without repetative and redundant code

Latest version **1.0.2** (published 2021-10-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongo-cruds
pnpm add mongo-cruds
yarn add mongo-cruds
bun add mongo-cruds
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-10-20 |
| First published | 2021-10-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vivek Solanki |
| Maintainers | vivek_01 |
| Keywords | mongo, DB |

## Links

- npm: https://www.npmjs.com/package/mongo-cruds
- Repository: https://github.com/vivek286/Mongo-Crud
- Homepage: https://github.com/vivek286/Mongo-Crud#readme
- Issues: https://github.com/vivek286/Mongo-Crud/issues
- npm.io page: https://npm.io/package/mongo-cruds

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^4.1.3

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-10-20
- 1.0.1 — 2021-10-20
- 1.0.0 — 2021-10-19

## README

<p align="center">
  <a href="https://www.npmjs.com/package/mongo-cruds" rel="noopener" target="_blank"><img width="500" height="300" src="https://user-images.githubusercontent.com/68116663/138152771-4c4b1bc5-86fa-4c67-aed6-abfc7f64b9e8.jpeg" alt="mongo-crud logo"></a></p>
</p>

<div align="center">

[**Mongo-Crud**](https://www.npmjs.com/package/mongo-cruds) is a CRUD operation library library which makes it extremely easy to use multiple crud operation on your web apps. It is highly customizable and enables you to stack multiple quries on top of one another.
</br>



</div>






Table of Contents
--
- [How to use](#how-to-use)
- [Documentation](#)
- [React / Nextjs support](#react-and-nextjs-support)


## Getting Started
Use your preferred package manager:
```
npm install mongo-cruds
yarn add mongo-cruds
```


### How to use

**1:** import `mongo_crud` from `mongo-cruds` .
<br />

```jsx
var {mongo_crud} = require("mongo-cruds");

```


**2:** Provide Configuraions to connect to db/cluster in an object.

```javascript
var {mongo_crud} = require("mongo-cruds");

var config={
        URL:"",         //mongo cluster URL
        db:"",          // Database name if any else give empty string
        collection:"",  //Collection name in database
    };
```

**3:** Provide object of quries as second parameter.

```javascript
//  Final way to use mongo-cruds
var {mongo_crud} = require("mongo-cruds");

var config={
        URL:"",         //mongo cluster URL
        db:"",          // Database name if any else give empty string
        collection:"",  //Collection name in database
    };
    
    let results=await mongo_crud(config,{find:"",findOne:{}});
   console.log(results);
```
Response will be in form of array containing response from each query executed on mongo-crud.



### React and Nextjs support:
Mongo-Cruds is compatable with every version of node js and with all frameworks.

### Contribution
Open an issue and your problem will be solved.


### Author - Contact
Vivek Solanki


<a href="https://www.linkedin.com/in/vivek-solanki-7779641b1/"><img src="https://github.com/iamhosseindhv/Rentaly/blob/master/Gifs/linkedin.png" alt="Vivek Solanki Linkedin profile" align="right" width="32" height="32"/></a>
<a href="mailto:solankivivek4140@gmail.com"><img src="https://github.com/iamhosseindhv/Rentaly/blob/master/Gifs/contact.png" alt="Vivek Solanki email address" align="right" width="32" height="32"/></a>

---
_Source: https://npm.io/package/mongo-cruds · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
