# mz-repository

> DDD Repository Pattern implementation

Latest version **0.0.5** (published 2015-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install mz-repository
pnpm add mz-repository
yarn add mz-repository
bun add mz-repository
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2015-01-09 |
| First published | 2015-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mizchi |

## Links

- npm: https://www.npmjs.com/package/mz-repository
- npm.io page: https://npm.io/package/mz-repository

## Recent versions

- 0.0.5 (latest) — 2015-01-09
- 0.0.4 — 2015-01-09
- 0.0.3 — 2015-01-08
- 0.0.2 — 2015-01-08
- 0.0.1 — 2015-01-08

## README

# mz-repository

```
npm install mz-repository
```

Repository pattern implematation with Promise.

See `repository.d.ts`

Now it is only for minimongo

coffeescirpt

```coffee
Repository = require 'mz-repository/adapters/minimongo'

# setup by minimongo way
minimongo = require 'minimongo'
db = new minimongo.MemoryDb
db.addCollection 'foo'

# Use via repository api
DB = new Repository.Database(db)
Foo = DB.getCollection 'foo'
Foo.where({name: 'foo'}).then (items) -> 'items'
```

with typescript

```typescript
///<reference path='reposistory.d.ts' />
var DB = new Repository.Database(db);
var Foo = DB.getCollection<{name: string;}>('foo');
Foo.where({name: 'foo'}).then((items) => console.log(items));
```

## TODO

- PouchDB

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