# monk-middleware-cast-ids

> A monk middleware to parse the ids

Latest version **0.2.1** (published 2017-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install monk-middleware-cast-ids
pnpm add monk-middleware-cast-ids
yarn add monk-middleware-cast-ids
bun add monk-middleware-cast-ids
```

## 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.2.1 |
| Published | 2017-06-03 |
| First published | 2017-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1827 |
| Maintainers | mathieudutour |
| Keywords | monk, middleware, ids |

## Links

- npm: https://www.npmjs.com/package/monk-middleware-cast-ids
- Repository: https://github.com/Automattic/monk
- Homepage: https://github.com/Automattic/monk#readme
- Issues: https://github.com/Automattic/monk/issues
- npm.io page: https://npm.io/package/monk-middleware-cast-ids

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2017-06-03
- 0.2.0 — 2017-05-21

## README

<h1 align="center">Monk</h1>

<div align="center">
  <img src="https://avatars2.githubusercontent.com/u/28830676?v=3&s=200" />
</div>
<br />
<div align="center">
  <strong>A tiny layer that provides simple yet substantial usability
improvements for MongoDB usage within Node.JS.</strong>
</div>
<br />

[![build status](https://secure.travis-ci.org/Automattic/monk.svg?branch=master)](https://secure.travis-ci.org/Automattic/monk)
[![codecov](https://codecov.io/gh/Automattic/monk/branch/master/graph/badge.svg)](https://codecov.io/gh/Automattic/monk)
[![Join the chat at https://gitter.im/Automattic/monk](https://badges.gitter.im/Automattic/monk.svg)](https://gitter.im/Automattic/monk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

*note*: monk 2.x drop the support for node < 0.12. If you are still using an earlier version, stick to monk 1.x

```js
const db = require('monk')('localhost/mydb')
// or
// const db = require('monk')('user:pass@localhost:port/mydb')

const users = db.get('users')

users.index('name last')
users.insert({ name: 'Tobi', bigdata: {} })
users.find({ name: 'Loki' }, '-bigdata').then(function () {
  // exclude bigdata field
})
users.find({}, {sort: {name: 1}}).then(function () {
  // sorted by name field
})
users.remove({ name: 'Loki' })

db.close()
```

## Features

- Well-designed API signatures
- Easy connections / configuration
- Command buffering. You can start querying right away
- Promises built-in for all queries. Easy interoperability with modules
- Auto-casting of `_id` in queries
- Allows to set global options or collection-level options for queries. (eg:
  `castIds` is `true` by default for all queries)

## Middlewares

Most of the Monk's features are implemented as [middleware](https://automattic.github.io/monk/docs/middlewares.html).

There are a bunch of third-parties middlewares that add even more functionalities to Monk:
- [monk-middleware-wrap-non-dollar-update](https://github.com/monk-middlewares/monk-middleware-wrap-non-dollar-update)
- [monk-middleware-debug](https://github.com/monk-middlewares/monk-middleware-debug)
- [monk-middleware-dereference](https://github.com/monk-middlewares/monk-middleware-dereference)

*Created an nice middleware? Send a PR to add to the list!*

## How to use

[Documentation](https://Automattic.github.io/monk)

## License

MIT

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