<commit_before>/*!
 * try-open <https://github.com/jonschlinkert/try-open>
 *
 * Copyright (c) 2015, <NAME>.
 * Licensed under the MIT License.
 */

'use strict';

var fs = require('fs');

module.exports = function(filepath, flags, mode) {
  try {
    if (typeof flags === 'undefined') {
      flags = 'r';
    }
    return fs.openSync(filepath, flags, mode);
  } catch (err) {
    if (err.code === 'ENOENT') {
      return false;
    } else {
      throw err;
    }
  }
};
<commit_msg>return false on undefined<commit_after>/*!
 * try-open <https://github.com/jonschlinkert/try-open>
 *
 * Copyright (c) 2015, <NAME>.
 * Licensed under the MIT License.
 */

'use strict';

var fs = require('fs');

module.exports = function(filepath, flags, mode) {
  if (!filepath) return false;

  try {
    if (typeof flags === 'undefined') {
      flags = 'r';
    }
    return fs.openSync(filepath, flags, mode);
  } catch (err) {
    if (err.code === 'ENOENT') {
      return false;
    } else {
      throw err;
    }
  }
};

{'fraction_non_alphanumeric': 0.1732283464566929, 'fraction_numerical': 0.007874015748031496, 'mean_word_length': 2.6451612903225805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1281132', 'n_tokens_mistral': 363, 'n_tokens_neox': 353, 'n_words': 91}