# loopback-mixin-dotted-key

> loopback mixin to workaround dotted keys in MongoDB

Latest version **1.0.2** (published 2020-06-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install loopback-mixin-dotted-key
pnpm add loopback-mixin-dotted-key
yarn add loopback-mixin-dotted-key
bun add loopback-mixin-dotted-key
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-06-18 |
| First published | 2019-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mohammed Essehemy |
| Maintainers | mohammedessehemy |
| Keywords | loopback, mixin, dotted, key, MongoDB |

## Links

- npm: https://www.npmjs.com/package/loopback-mixin-dotted-key
- Repository: https://github.com/MohammedEssehemy/loopback-mixin-dotted-key
- Homepage: https://github.com/MohammedEssehemy/loopback-mixin-dotted-key#readme
- Issues: https://github.com/MohammedEssehemy/loopback-mixin-dotted-key/issues
- npm.io page: https://npm.io/package/loopback-mixin-dotted-key

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^4.1.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

- 1.0.2 (latest) — 2020-06-18
- 1.0.1 — 2020-03-18
- 1.0.0 — 2020-03-17
- 0.0.4 — 2019-06-12
- 0.0.3 — 2019-05-22
- 0.0.2 — 2019-05-21
- 0.0.1 — 2019-05-21

## README

### loopback-mixin-dotted-key [![Build Status](https://travis-ci.com/ninja-labs-tech/loopback-mixin-dotted-key.svg?branch=master)](https://travis-ci.com/ninja-labs-tech/loopback-mixin-dotted-key)

[loopback v3](https://loopback.io/) mixin to enable changing dotted keys before storing in MongoDB.

### usage ###

* install via npm.

```shell
npm install loopback-mixin-dotted-key
```

* update `server.js` to load mixin.

```javascript
const DottedKeysReplace = require('loopback-mixin-dotted-key');

DottedKeysReplace(app);
```

* add mixins property to the required model.

```json
"mixins": {
  "DottedKeysReplace" : {
    "search": ".",
    "replace": "#",
  }
}
```

### options ###

_search_: char to replace, defaults to `.`.

_replace_: char to replace with, defaults to `#`.

### DEBUG MODE ###

```
DEBUG='loopback:mixin:dotted-key'
```

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