<commit_before>var mongoose = require('mongoose');
var bcrypt = require('bcrypt');

var userSchema = new mongoose.Schema({
  username: { type: String, unique: true, sparse: true },
  password: <PASSWORD>,

  tokens: Array,
  provider: String,
  facebook: String,
  twitter: String,
  google: String,
  github: String,

  profile: {
    name: { type: String, default: '' },
    email: { type: String, default: '' },
    gender: { type: String, default: '' },
    location: { type: String, default: '' },
    website: { type: String, default: '' },
    picture: { type: String, default: '' }
  }
});

userSchema.pre('save', function(next) {
  var user = this;
  var SALT_FACTOR = 5;
<commit_msg>Updated schema<commit_after>var mongoose = require('mongoose');
var bcrypt = require('bcrypt');

var userSchema = new mongoose.Schema({
  email: { type: String, unique: true },
  password: <PASSWORD>,

  tokens: Array,
  provider: String,
  facebook: { type: String, unique: true, sparse: true },
  twitter: { type: String, unique: true, sparse: true },
  google: { type: String, unique: true, sparse: true },
  github: { type: String, unique: true, sparse: true },

  profile: {
    name: { type: String, default: '' },
    gender: { type: String, default: '' },
    location: { type: String, default: '' },
    website: { type: String, default: '' },
    picture: { type: String, default: '' }
  }
});

userSchema.pre('save', function(next) {
  var user = this;
  var SALT_FACTOR = 5;

{'fraction_non_alphanumeric': 0.16689189189189188, 'fraction_numerical': 0.0013513513513513514, 'mean_word_length': 3.762057877813505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2042899', 'n_tokens_mistral': 490, 'n_tokens_neox': 476, 'n_words': 143}