<commit_before>const logAF = function logAF(...args) {
  const error = new Error();
  if (logAF.label && error.stack) {
    let lineNum;
    const setFormat = {
      fileName() {
        const start = error.stack.lastIndexOf`/` + 1;
        const end = error.stack.indexOf(')', start);
        lineNum = `@${error.stack.slice(start, end)}:`;
      },
      filePath() {
        const target = error.stack.lastIndexOf`/`;
        const cutoff = error.stack.slice(0, error.stack.indexOf(')', target));
        const newLineForPaths = typeof args[0] !== 'object' ? '\n' : '';
        lineNum = `@${cutoff.slice(cutoff.lastIndexOf`(` + 1)}:${newLineForPaths}`;
      },
      parent() {
        const target = error.stack.lastIndexOf`/`;
        const end = error.stack.indexOf(')', target);
        const start = error.stack.slice(0, target).lastIndexOf`/` + 1;
        lineNum = `@${error.stack.slice(start, end)}:`;
      },
    };
    setFormat[logAF.labelFormat]();
    args.unshift(typeof args[0] === 'object' ? `${lineNum}\n` : lineNum);
  }
  Promise.all(args).then(toLog => console.log(...toLog));
};

logAF.label = true;
logAF.labelFormat = 'fileName';

logAF.options = function logAFOptions(options) {
  if (options.label === false) logAF.label = false;
  if (options.labelFormat) {
    const validFormats = ['fileName', 'filePath', 'parent'];
    const desiredFormat = options.labelFormat;
    if (!validFormats.includes(desiredFormat)) {
      const msg = 'AsyncAF Warning: logAF labelFormat option must be set to \'fileName\' (default), \'filePath\', or \'parent\'';
      // eslint-disable-next-line
      console ? console.warn ? console.warn(msg) : console.log ? console.log(msg) : null : null;
    } else logAF.labelFormat = desiredFormat;<commit_msg>(feat) add 'fatArrow' labelFormat to logAF options<commit_after>const logAF = function logAF(...args) {
  const error = new Error();
  if (logAF.label && error.stack) {
    let lineNum;
    const setFormat = {
      fileName() {
        const start = error.stack.lastIndexOf`/` + 1;
        const end = error.stack.indexOf(')', start);
        lineNum = `@${error.stack.slice(start, end)}:`;
      },
      filePath() {
        const target = error.stack.lastIndexOf`/`;
        const cutoff = error.stack.slice(0, error.stack.indexOf(')', target));
        const newLineForPaths = typeof args[0] !== 'object' ? '\n' : '';
        lineNum = `@${cutoff.slice(cutoff.lastIndexOf`(` + 1)}:${newLineForPaths}`;
      },
      parent() {
        const target = error.stack.lastIndexOf`/`;
        const end = error.stack.indexOf(')', target);
        const start = error.stack.slice(0, target).lastIndexOf`/` + 1;
        lineNum = `@${error.stack.slice(start, end)}:`;
      },
      fatArrow() {
        lineNum = '========================>';
      },
    };
    setFormat[logAF.labelFormat]();
    args.unshift(typeof args[0] === 'object' ? `${lineNum}\n` : lineNum);
  }
  Promise.all(args).then(toLog => console.log(...toLog));
};

logAF.label = true;
logAF.labelFormat = 'fileName';

logAF.options = function logAFOptions(options) {
  if (options.label === false) logAF.label = false;
  if (options.labelFormat) {
    const validFormats = ['fileName', 'filePath', 'parent', 'fatArrow'];
    const desiredFormat = options.labelFormat;
    if (!validFormats.includes(desiredFormat)) {
      const msg = 'AsyncAF Warning: logAF labelFormat option must be set to \'fileName\' (default), \'filePath\', \'parent\', or \'fatArrow\'';
      // eslint-disable-next-line
      console ? console.warn ? console.warn(msg) : console.log ? console.log(msg) : null : null;
    } else logAF.labelFormat = desiredFormat;
{'fraction_non_alphanumeric': 0.18147138964577655, 'fraction_numerical': 0.0038147138964577656, 'mean_word_length': 3.0474090407938257, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '28578', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1175, 'n_words': 249}