# mongoose-inserter

> A fast mongoose inserter.

Latest version **0.0.4** (published 2014-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongoose-inserter
pnpm add mongoose-inserter
yarn add mongoose-inserter
bun add mongoose-inserter
```

## 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.4 |
| Published | 2014-12-18 |
| First published | 2014-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | faceair |
| Maintainers | faceair |
| Keywords | mongoose, insert |

## Links

- npm: https://www.npmjs.com/package/mongoose-inserter
- Repository: https://github.com/faceair/mongoose-inserter
- Issues: https://github.com/faceair/mongoose-inserter/issues
- npm.io page: https://npm.io/package/mongoose-inserter

## Dependencies (2)

- [async](https://npm.io/package/async.md) ~0.9.0
- [underscore](https://npm.io/package/underscore.md) ~1.6.0

## 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

- 0.0.4 (latest) — 2014-12-18
- 0.0.3 — 2014-08-14
- 0.0.2 — 2014-08-13
- 0.0.1 — 2014-08-13

## README

mongoose-inserter
=================

A fast mongoose inserter.

### Use

Simply install it through npm

`npm install mongoose-inserter`

### Example

    mongoose = require "mongoose"
    ObjectId = require("mongoose").Types.ObjectId
    inserter = require './index'

    AppSchema = new mongoose.Schema
      app_id:
        type: String
        index:
          unique: true
      create_at: Date
    , { versionKey: false }

    AccountModel = mongoose.model "app", AppSchema

    mongoose.connect "mongodb://localhost:27017/test", (err)->
      throw err if err
      inserter.reset AccountModel, [
          app_id: "app",
          create_at: new Date()
        ], (err)->
          throw err if err
          inserter.insert AccountModel, [
              app_id: "app",
              create_at: new Date()
            ]

### License

The MIT License (MIT)

Copyright (c) 2014 faceair

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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