bookshelf-multi-mask

0.1.3 • Public • Published

bookshelf-multi-mask

Version node Code Climate Build Status Test Coverage Downloads

This Bookshelf.js plugin enables you to define masks on your models and serialize to JSON based on its fields using the json-mask API. It is based on bookshelf-mask, but it allows you to specify an array of scopes instead of just one. This is useful for ACL where a user may be part of multiple groups/roles.

Installation & Usage

Usage is the same as the plugin this module is based on: bookshelf-mask.

The only difference is using arrays when using the mask method:

model.mask(['custom', 'admin']);

Package Sidebar

Install

npm i bookshelf-multi-mask

Weekly Downloads

4

Version

0.1.3

License

MIT

Last publish

Collaborators

  • mike.moore
  • ingvar
  • emmpa
  • doubleyou
  • egorvorozhtsov
  • paulleduc