<commit_before>'use strict'
import mongoose from 'mongoose'
import isEmail from 'validator/lib/isEmail'
const Schema = mongoose.Schema

const UserSchema = new Schema({
  firstName: {
    type: String,
    required: true
  },
  lastName: {
    type: String,
    required: true
  },
  username: {
    type: String,
    required: true
  },
  email: {
    type: String,
    trim: true,
    lowercase: true,
    unique: true,
    required: true,
    validate: [isEmail, 'invalid email']
  }
})

let db = mongoose.createConnection('mongodb://kmathy:<EMAIL>:39122/koapi-db')
export const User = db.model('users', UserSchema)<commit_msg>fix(model): hide connection DB<commit_after>'use strict'
import mongoose from 'mongoose'
import isEmail from 'validator/lib/isEmail'
const Schema = mongoose.Schema

const UserSchema = new Schema({
  firstName: {
    type: String,
    required: true
  },
  lastName: {
    type: String,
    required: true
  },
  username: {
    type: String,
    required: true
  },
  email: {
    type: String,
    trim: true,
    lowercase: true,
    unique: true,
    required: true,
    validate: [isEmail, 'invalid email']
  }
})

let db = mongoose.createConnection(process.env.MONGO_URI)
export const User = db.model('users', UserSchema)
{'fraction_non_alphanumeric': 0.12270916334661354, 'fraction_numerical': 0.00398406374501992, 'mean_word_length': 3.3916083916083917, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4592517', 'n_tokens_mistral': 414, 'n_tokens_neox': 417, 'n_words': 112}