code: function hashPassword (data) {
    var password = data.password
    var hash = data.hash
  
    if (password) {
      var salt = bcrypt.genSaltSync(10)
      hash = bcrypt.hashSync(password, salt)
    }
  
    this.hash = hash
  }
docs: Hash Password Setter