# mongoose-model-create

> Short-hand for creating `mongoose` model using `Typescript`.

Latest version **1.0.2** (published 2021-11-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongoose-model-create
pnpm add mongoose-model-create
yarn add mongoose-model-create
bun add mongoose-model-create
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-11-15 |
| First published | 2021-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Roman Stražanec |
| Maintainers | romanstrazanec |
| Keywords | mongoose, model |

## Links

- npm: https://www.npmjs.com/package/mongoose-model-create
- Repository: https://github.com/romanstrazanec/mongoose-model-create
- Homepage: https://github.com/mongoose-model-create
- Issues: https://github.com/romanstrazanec/mongoose-model-create/issues
- npm.io page: https://npm.io/package/mongoose-model-create

## Dependencies (1)

- [mongoose](https://npm.io/package/mongoose.md) ^6.0.12

## 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-11-15
- 1.0.1 — 2021-11-02
- 1.0.0 — 2021-11-01

## README

# Mongoose model create

Short-hand for creating `mongoose` model using `Typescript`.

```typescript
// Define attributes.
interface TestAttrs {
    name: string
}

// Create model.
const Test = createModel<TestAttrs>('Test', {
    name: {
        type: String,
        required: true
    }
});

// Create instance of the model with build method.
const test = Test.build({name: 'new test'})
await test.save()
```

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