# typemongo

> A Typescript based generic MongoDB Repository

Latest version **0.0.1-canary-11** (published 2018-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install typemongo
pnpm add typemongo
yarn add typemongo
bun add typemongo
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-canary-11 |
| Published | 2018-10-04 |
| First published | 2018-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 56.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sahal Sajjad |
| Maintainers | sahalsajjad |

## Links

- npm: https://www.npmjs.com/package/typemongo
- Repository: https://github.com/knocus/typemongo
- Homepage: https://github.com/knocus/typemongo#readme
- Issues: https://github.com/knocus/typemongo/issues
- npm.io page: https://npm.io/package/typemongo

## Dependencies (4)

- [bson](https://npm.io/package/bson.md) ^3.0.2
- [mongodb](https://npm.io/package/mongodb.md) ^3.1.1
- [@types/bson](https://npm.io/package/@types/bson.md) ^1.0.11
- [@types/mongodb](https://npm.io/package/@types/mongodb.md) ^3.1.3

## Recent versions

- 0.0.1-canary-11 (latest) — 2018-10-04
- 0.0.1-canary-10 — 2018-10-01
- 0.0.1-canary-9 — 2018-09-28
- 0.0.1-canary-7 — 2018-09-15
- 0.0.1-canary-6 — 2018-09-15
- 0.0.1-canary-5 — 2018-09-01
- 0.0.1-canary-4 — 2018-08-31
- 0.0.1-canary-3 — 2018-08-30
- 0.0.1-canary-2 — 2018-08-30
- 0.0.1-canary-1 — 2018-08-30
- 0.0.1-canary-m3Al1 — 2018-08-21
- 0.0.1-canary-2mw3a89d — 2018-08-20
- 0.0.1-canary-2m3a89d — 2018-08-20
- 0.0.1-canary-8lmq9A0cTx — 2018-08-20
- 0.0.1-canary-32n4klm — 2018-08-18
- … 7 more at https://npm.io/package/typemongo/versions

## README

# TypeMongo [Work in Progress] [Unstable]
A generic [MongoDB](https://www.mongodb.com) repository for [Typescript](https://www.typescriptlang.org).
#### Introduction
MongoDB business logic written solely with native driver can quickly pile up a lot boilerplate code. Most of it can be reused with [generics](https://www.typescriptlang.org/docs/handbook/generics.html) and developing a generic repository that gets inherited by specific repositories.

There are other alternatives like [Mongoose](www.mongoosejs.com), [Mongolia](https://github.com/masylum/mongolia) which tackle reducing the bolierplate with different approaches.

TypeMongo solves it with Repository Pattern.
```
import { MongoRepository } from 'typemongo'
class MyRepository extends MongoRepository {
    constructor(){
        super()
    }

    /*
        MY REPO SPECIFIC METHODS HERE
    */
}
```

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