<commit_before>var express = require('express'),
    path    = require('path'),
   	fs		= require('fs');

function JSONAuth(filePath) {
    var userList = null;

    filePath = path.join(process.cwd(), filePath || 'user.json');

    if (!fs.existsSync(filePath)) {
    	throw new Error('File ' + filePath + ' not found!');
    }

    userList = require(filePath);

    return JSONAuth.plain(userList);
}

JSONAuth.plain = function (list) {
    return express.basicAuth(function (user, passwd) {
        return list[user] && passwd === list[user];
    });
}

module.exports = JSONAuth;
<commit_msg>fix tabulation<commit_after>var express = require('express'),
    path    = require('path'),
    fs      = require('fs');

function JSONAuth(filePath) {
    var userList = null;

    filePath = path.join(process.cwd(), filePath || 'user.json');

    if (!fs.existsSync(filePath)) {
        throw new Error('File ' + filePath + ' not found!');
    }

    userList = require(filePath);

    return JSONAuth.plain(userList);
}

JSONAuth.plain = function (list) {
    return express.basicAuth(function (user, passwd) {
        return list[user] && passwd === list[user];
    });
}

module.exports = JSONAuth;

{'fraction_non_alphanumeric': 0.15806988352745424, 'fraction_numerical': 0.0, 'mean_word_length': 3.281138790035587, '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': '3168850', 'n_tokens_mistral': 388, 'n_tokens_neox': 379, 'n_words': 83}