1.0.2 • Published 5 years ago

loopback-mixin-dotted-key v1.0.2

Weekly downloads
8
License
ISC
Repository
github
Last release
5 years ago

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'
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago