<commit_before>var less = require("less")
  , through = require('through')
  , path = require('path');

module.exports = function(file) {
  var input = '';
  if (/\.less$/i.test(file) === false) {
    return through(); 
  } 

  function write(data) { input += data; }
  function end() {
    var self = this;

    function jsToLoad(css) {
      return "var css = "+ JSON.stringify(css) +";"+ 
             "(require('lessify'))(css); module.exports = css;";
    }

    function render(callback) {
      try {
        less.render(input, {filename: file, paths: [path.dirname(file)]}, function(err, css) {
          if (err) {
            callback(err);
          } else {
            callback(null, css);
          }
        });
      } catch (error) {
        callback(error);
      }
    }

    render(function (err, css) {
      if (err) {
        self.emit('error', err);
      } else {<commit_msg>try/catch not necessary, simplifying<commit_after>var less = require("less")
  , through = require('through')
  , path = require('path');

module.exports = function(file) {
  var input = '';
  if (/\.less$/i.test(file) === false) {
    return through(); 
  } 

  function write(data) { input += data; }
  function end() {
    var self = this;

    function jsToLoad(css) {
      return "var css = "+ JSON.stringify(css) +";"+ 
             "(require('lessify'))(css); module.exports = css;";
    }

    less.render(input, {filename: file, paths: [path.dirname(file)]}, function(err, css) {
      if (err) {
        self.emit('error', err);
      } else {
{'fraction_non_alphanumeric': 0.1788931788931789, 'fraction_numerical': 0.0, 'mean_word_length': 2.3585313174946005, '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': '2379711', 'n_tokens_mistral': 502, 'n_tokens_neox': 486, 'n_words': 110}