Skip to content
A loopback mixin to overwrite base User model to work with multiple emails and phone numbers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
models
templates
test
.eslintrc
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
multi-emails-and-phones.js
package-lock.json
package.json

README.md

loopback-multi-emails-and-phones-mixin (WIP)

NPM version NPM downloads devDependency Status Build Status

MIT license Gitter Chat

##Features

  • multiple emails
  • multiple phones

##Installation

npm install loopback-multi-emails-and-phones-mixin --save

##How to use

Add the mixins property to your server/model-config.json like the following:

{
  "_meta": {
    "sources": [
      "loopback/common/models",
      "loopback/server/models",
      "../common/models",
      "./models"
    ],
    "mixins": [
      "loopback/common/mixins",
      "../node_modules/loopback-multi-emails-and-phones-mixin",
      "../common/mixins"
    ]
  }
}

To use with your Models add the mixins attribute to the definition object of your model config.

{
  "name": "user",
  "base": "User",
  "properties": {
    "name": {
      "type": "string",
    }
  },
  "mixins": {
    "MultiEmailsAndPhones": true
  }
}

LIMITATIONS

TODO

  • Fix pending tests

License

MIT

You can’t perform that action at this time.