Skip to content

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.

betastreet/bookshelf-multi-mask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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']);

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published