export default function User(node) {
    let traits = [
        "firstName",
        "lastName",
        "email",
        "password"
    ]
    for(let i = 0; i < traits.length; i++) {
        if(!node[traits[i]]) {
            if (traits[i] == "lastName") { continue; } // Ignores optional Last Name
            throw new Error(`User  ${node.email} is missing trait ${traits[i]}`)
        }
    }
}