loopback-mixin-dotted-key

1.0.2 • Public • Published

loopback-mixin-dotted-key Build Status

loopback v3 mixin to enable changing dotted keys before storing in MongoDB.

usage

  • install via npm.
npm install loopback-mixin-dotted-key
  • update server.js to load mixin.
const DottedKeysReplace = require('loopback-mixin-dotted-key');

DottedKeysReplace(app);
  • add mixins property to the required model.
"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'

Package Sidebar

Install

npm i loopback-mixin-dotted-key

Weekly Downloads

24

Version

1.0.2

License

ISC

Unpacked Size

4.9 kB

Total Files

7

Last publish

Collaborators

  • mohammedessehemy