<commit_before>var mongoose = require('mongoose');
var bycrypt = require('bycrypt-nodejs');

var Schema = mongoose.Schema;

var UserSchema = new Schema({
	local : {
		email : String,
		passpword : String
	},
	facebook : {
		id : String,
		token : String,
		email : String,
		name : String

	},
	google : {
		id : String,
		token : String,
		email : String,
		name : String
	},
	twitter : {
		id : String,
		token : String,
		displayName : String,
		userName : String
	} 
});

UserSchema.methods.generateHash = function(passpword) {
	return bycrypt.hashSync(passpword, bycrypt.genSaltSync(8), null);
};

UserSchema.methods.validPassord = function(passpword) {
	return bycrypt.compareSync(passpword, this.local.password);
};

mongoose.exports = mongoose.model('User', UserSchema);<commit_msg>fixed the bug<commit_after>var mongoose = require('mongoose');
var bcrypt   = require('bcrypt-nodejs');

var Schema = mongoose.Schema;

var UserSchema = new Schema({
	local : {
		email : String,
		passpword : String
	},
	facebook : {
		id : String,
		token : String,
		email : String,
		name : String

	},
	google : {
		id : String,
		token : String,
		email : String,
		name : String
	},
	twitter : {
		id : String,
		token : String,
		displayName : String,
		userName : String
	} 
});

UserSchema.methods.generateHash = function(passpword) {
	return bycrypt.hashSync(passpword, bycrypt.genSaltSync(8), null);
};

UserSchema.methods.validPassord = function(passpword) {
	return bycrypt.compareSync(passpword, this.local.password);
};

module.exports = mongoose.model('User', UserSchema);
{'fraction_non_alphanumeric': 0.13307984790874525, 'fraction_numerical': 0.0012674271229404308, 'mean_word_length': 4.044728434504792, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7441981', 'n_tokens_mistral': 577, 'n_tokens_neox': 545, 'n_words': 119}