vitaminjs/vitamin

Add a `hidden` property for hidden fields

Closed this issue · 0 comments

hidden fields, with sensitive information, should not be returned by toJSON() like passwords, salts ... etc

var User = Model.extend({
  $hidden: [ 'password', 'salt' ]
}

All fields are visible, so to hide some, we can use the hidden flag