<commit_before>"use strict"

const fs = require('fs'),
      helpers = require('helpers');

//TODO sanity checks
class CookieJar() {

    constructor() {
        this._cookiePath = helpers.getConfigPath() + 'cookies.yml';
        this._cookieJar = this._read();
    }

    getAll() {
        return this._cookieJar;
    }

    write(cookies) {
        this._cookieJar = Object.assign({}, this._cookieJar, cookies);                    
        // write new file 
        fs.writeFile(this._cookiePath, yaml.safeDump(this._cookieJar);
    }

    _read() {
        return yaml.safeLoad(fs.readFileSync(this._cookieJar));
    }
}<commit_msg>export the class<commit_after>"use strict"

const fs = require('fs'),
      helpers = require('helpers');

//TODO sanity checks
class CookieJar() {

    constructor() {
        this._cookiePath = helpers.getConfigPath() + 'cookies.yml';
        this._cookieJar = this._read();
    }

    getAll() {
        return this._cookieJar;
    }

    write(cookies) {
        this._cookieJar = Object.assign({}, this._cookieJar, cookies);                    
        // write new file 
        fs.writeFile(this._cookiePath, yaml.safeDump(this._cookieJar);
    }

    _read() {
        return yaml.safeLoad(fs.readFileSync(this._cookieJar));
    }
}

module.exports = CookieJar;
{'fraction_non_alphanumeric': 0.13552833078101073, 'fraction_numerical': 0.0, 'mean_word_length': 2.3512820512820514, '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': '4392358', 'n_tokens_mistral': 428, 'n_tokens_neox': 405, 'n_words': 72}