<commit_before>
var mime = require('mime');

/*
Takes in data and a filename and returns a file for download
{
    data: string,
    filename: string
}
*/
exports.downloadData = function(req, res) {
    var data = req.body.data;
    var filename = req.body.filename;
    var mimeType = mime.lookup(filename)
    var safeFilename = filename.replace(/\s+/g,'-');

    console.log("testing");

    res.setHeader('Content-disposition', 'attachment; filename='+safeFilename);
    res.setHeader('Content-type', 'text/html');
    res.send(data);
}<commit_msg>testing some more<commit_after>
var mime = require('mime');

/*
Takes in data and a filename and returns a file for download
{
    data: string,
    filename: string
}
*/
exports.downloadData = function(req, res) {
    var data = req.body.data;
    var filename = req.body.filename;
    var mimeType = mime.lookup(filename)
    var safeFilename = filename.replace(/\s+/g,'-');

    console.log("testing 222");

    res.setHeader('Content-disposition', 'attachment; filename='+safeFilename);
    res.setHeader('Content-type', 'text/html');
    res.send(data);
}
{'fraction_non_alphanumeric': 0.1510791366906475, 'fraction_numerical': 0.002697841726618705, 'mean_word_length': 3.7161016949152543, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '340246', 'n_tokens_mistral': 359, 'n_tokens_neox': 346, 'n_words': 87}