daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. User: {
  2.   name: 'Paul',
  3.   email: 'paul@gmail.com',
  4.   token: 'sdffsdf',
  5.   id: 1
  6. }
  7.      
  8. module.exports = {
  9.     attributes: {
  10.         name: 'string',
  11.         email: 'email',
  12.         token: 'string',
  13.         toJSON: function() {
  14.             var obj = this.toObject();
  15.             delete obj.token;
  16.             return obj;
  17.         }
  18.     }
  19. }
  20.      
  21. customToJSON: function () {
  22.  return _.omit(this, ['token'])
  23. },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top