<commit_before>// Dependencies
var request = require('request');

// Includes
var _login = require('./util/login.js'),
  getSession = require('./util/getSession.js');

// Vars
var _jar = request.jar(); // Default cookie jar

// Define
function login(options,password,jar) {
  if (typeof options == 'object') {
    var j = options.jar;
    _login(options.username,options.password,(j ? j : (j === true && _jar)));
  } else if (typeof options == 'string')
    _login(options,password,(jar ? jar : (jar === true && _jar)));
}

// Export
module.exports = {
  login: login,
  getSession: getSession
};
<commit_msg>Add alternative form to getSession<commit_after>// Dependencies
var request = require('request');

// Includes
var _login = require('./util/login.js'),
  _getSession = require('./util/getSession.js');

// Vars
var _jar = request.jar(); // Default cookie jar

// Define
function login(options,password,jar) {
  if (typeof options == 'object') {
    var j = options.jar;
    _login(options.username,options.password,(j ? j : (j === true && _jar)));
  } else if (typeof options == 'string')
    _login(options,password,(jar ? jar : (jar === true && _jar)));
}

function getSession(options) {
  if (options.hasOwnProperty('jar'))
    getSession(options.jar);
  else
    getSession(options);
}

// Export
module.exports = {
  login: login,
  getSession: getSession
};

{'fraction_non_alphanumeric': 0.1749271137026239, 'fraction_numerical': 0.0, 'mean_word_length': 3.851590106007067, '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': '5058746', 'n_tokens_mistral': 432, 'n_tokens_neox': 428, 'n_words': 109}