<commit_before>var UUID = require("node-uuid");
var bcrypt = require("bcrypt-nodejs");

exports.convertToUser = function(body, callback){
    if(body.name && body.email && body.password){
        var user = {
            id : UUID.v1(),
            name : body.name,
            email : body.email,
            password : <PASSWORD>(body.password)
        };
        callback(null, user);
    }
    else{
        callback({name : 'CONVERSION_ERROR'});
    }
}

exports.convertToDTO = function(user, callback){
    var dto = {
        id : user.id,
        name : user.name,<commit_msg>small fix to lowecase emails<commit_after>var UUID = require("node-uuid");
var bcrypt = require("bcrypt-nodejs");

exports.convertToUser = function(body, callback){
    if(body.name && body.email && body.password){
        var user = {
            id : UUID.v1(),
            name : body.name,
            email : body.email.toLowerCase(),
            password : <PASSWORD>(body.password)
        };
        callback(null, user);
    }
    else{
        callback({name : 'CONVERSION_ERROR'});
    }
}

exports.convertToDTO = function(user, callback){
    var dto = {
        id : user.id,
        name : user.name,
{'fraction_non_alphanumeric': 0.14261884904086738, 'fraction_numerical': 0.0016680567139282735, 'mean_word_length': 2.1578947368421053, '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': '6019040', 'n_tokens_mistral': 365, 'n_tokens_neox': 368, 'n_words': 75}