<commit_before>var grunt = require('grunt'),
    falafel = require('falafel'),
    fs = require('fs');

exports.stripNodes = function(nodeName, file, dest) {
  "use strict";

  var existsSync = fs.existsSync || require('path').existsSync;

  var src = fs.existsSync(file) ? grunt.file.read(file) : file;

  var output = falafel(src, function(node){
    if (
        node.type === 'CallExpression' &&
        node.callee.object && node.callee.object.name === nodeName
      ) {
      node.update('0');
    }
  });

  if (dest) {
    return grunt.file.write(dest, output);
  } else {
    return output.toString();
  }
};

<commit_msg>actually using fallback for existsSync<commit_after>var grunt = require('grunt'),
    falafel = require('falafel'),
    fs = require('fs');

exports.stripNodes = function(nodeName, file, dest) {
  "use strict";

  var existsSync = fs.existsSync || require('path').existsSync;

  var src = existsSync(file) ? grunt.file.read(file) : file;

  var output = falafel(src, function(node){
    if (
        node.type === 'CallExpression' &&
        node.callee.object && node.callee.object.name === nodeName
      ) {
      node.update('0');
    }
  });

  if (dest) {
    return grunt.file.write(dest, output);
  } else {
    return output.toString();
  }
};


{'fraction_non_alphanumeric': 0.1656298600311042, 'fraction_numerical': 0.0015552099533437014, 'mean_word_length': 3.0727848101265822, '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': '5864117', 'n_tokens_mistral': 438, 'n_tokens_neox': 425, 'n_words': 86}