<commit_before>require('shelljs/global');
var utils = require('./utils');

function pdfinfo (filename, options) {
  this.options = options || {};
  this.options.additional = ['"' + filename + '"'];

  pdfinfo.prototype.add_options = function(optionArray) {
    if (typeof optionArray.length !== undefined) {
        var self = this;
        optionArray.forEach(function(el) {
          if (el.indexOf(' ') > 0) {
            var values = el.split(' ');
            self.options.additional.splice(0, 0, values[1]);
            self.options.additional.splice(0, 0, values[0]);
          } else {
            self.options.additional.splice(0, 0, el);
          }
        });
    }
    return this;
  };

  pdfinfo.prototype.get = function() {
    var self = this;
    var child = exec('pdfinfo ' + self.options.additional.join(' '), {async:true, silent:true});
    <commit_msg>undo option order changes<commit_after>require('shelljs/global');
var utils = require('./utils');

function pdfinfo (filename, options) {
  this.options = options || {};
  this.options.additional = ['"' + filename + '"'];

  pdfinfo.prototype.add_options = function(optionArray) {
    if (typeof optionArray.length !== undefined) {
        var self = this;
        optionArray.forEach(function(el) {
          if (el.indexOf(' ') > 0) {
            var values = el.split(' ');
            self.options.additional.push(values[0], values[1]);
          } else {
            self.options.additional.push(el);
          }
        });
    }
    return this;
  };

  pdfinfo.prototype.get = function() {
    var self = this;
    var child = exec('pdfinfo ' + self.options.additional.join(' '), {async:true, silent:true});
    
{'fraction_non_alphanumeric': 0.16351829988193625, 'fraction_numerical': 0.0070838252656434475, 'mean_word_length': 2.5093167701863353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1821309', 'n_tokens_mistral': 517, 'n_tokens_neox': 498, 'n_words': 99}