Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null

Response:
# built product goes here
    output: './build'

    # preview server settings
    hostname: null # INADDR_ANY
    port: 8080

    # options prefixed with _ are undocumented and should generally not be modified
    _fileLimit: 40 # max files to keep open at once

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else


Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

    # options prefixed with _ are undocumented and should generally not be modified
    _fileLimit: 40 # max files to keep open at once

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      config = new Config options


Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null

Response:
# built product goes here
    output: './build'

    # options prefixed with _ are undocumented and should generally not be modified
    _fileLimit: 40 # max files to keep open at once

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      config = new Config options


Response:
config.__filename = path
      callback null, config
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  config = new Config readJSONSync path
  config.__filename = path
  return config

### Exports ###

module.exports = {Config}


Prompt:
config.__filename = path
      callback null, config
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path

Response:
throw new Error "Config file at '#{ path }' does not exist."
  config = new Config readJSONSync path
  config.__filename = path
  return config

### Exports ###

module.exports = {Config}


Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

    # options prefixed with _ are undocumented and should generally not be modified
    _fileLimit: 40 # max files to keep open at once

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options


Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null

Response:
# built product goes here
    output: './build'

    # options prefixed with _ are undocumented and should generally not be modified
    _fileLimit: 40 # max files to keep open at once

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options


Response:
], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Prompt:
], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path

Response:
throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

    # max files to keep open at once
    fileLimit: 100

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

    # max files to keep open at once
    fileLimit: 100

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback
```

Response:
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: null,
    // built product goes here
    output: './build',
    // max files to keep open at once
    fileLimit: 100
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: null,
    // built product goes here
    output: './build',
    // max files to keep open at once
    fileLimit: 100
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};
```

Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

    # max files to keep open at once
    fileLimit: 100

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback


Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null

Response:
# built product goes here
    output: './build'

    # max files to keep open at once
    fileLimit: 100

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback


Response:
Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config
```

Response:
Config.fromFileSync = function(path) {
  /* Read config from *path* as JSON return a Config instance. */
  if (!fileExistsSync(path)) {
    throw new Error(`Config file at '${path}' does not exist.`);
  }
  return new Config(readJSONSync(path));
};

/* Exports */
exports.Config = Config;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
Config.fromFileSync = function(path) {
  /* Read config from *path* as JSON return a Config instance. */
  if (!fileExistsSync(path)) {
    throw new Error(`Config file at '${path}' does not exist.`);
  }
  return new Config(readJSONSync(path));
};

/* Exports */
exports.Config = Config;
```

Response:
Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Prompt:
Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
  if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."

Response:
return new Config readJSONSync path

### Exports ###

exports.Config = Config


Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
```

Response:
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

console.log(fileExistsSync);

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: null,
    // built product goes here
    output: './build'
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};

Config.fromFileSync = function(path) {};

/* Read config from *path* as JSON return a Config instance. */


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

console.log(fileExistsSync);

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: null,
    // built product goes here
    output: './build'
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};

Config.fromFileSync = function(path) {};

/* Read config from *path* as JSON return a Config instance. */
```

Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: null
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from

Response:
views: null
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Response:
if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config
```

Response:
if (!fileExistsSync(path)) {
  throw new Error(`Config file at '${path}' does not exist.`);
}

return new Config(readJSONSync(path));

/* Exports */
exports.Config = Config;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
if (!fileExistsSync(path)) {
  throw new Error(`Config file at '${path}' does not exist.`);
}

return new Config(readJSONSync(path));

/* Exports */
exports.Config = Config;
```

Response:
if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

### Exports ###

exports.Config = Config


Prompt:
if not fileExistsSync path
    throw new Error "Config file at '#{ path }' does not exist."
  return new Config readJSONSync path

Response:
### Exports ###

exports.Config = Config


Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: './views'
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: './views'
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###
```

Response:
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

console.log(fileExistsSync);

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: './views',
    // built product goes here
    output: './build'
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};

Config.fromFileSync = function(path) {};

/* Read config from *path* as JSON return a Config instance. */


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/* config.coffee */
var Config, async, fileExists, fileExistsSync, fs, path, readJSON, readJSONSync;

fs = require('fs');

path = require('path');

async = require('async');

({readJSON, readJSONSync, fileExists, fileExistsSync} = require('./utils'));

console.log(fileExistsSync);

Config = (function() {
  var defaults;

  class Config {
    constructor(options) {
      var defaultValue, option, value;
      for (option in options) {
        value = options[option];
        this[option] = value;
      }
      for (option in defaults) {
        defaultValue = defaults[option];
        if (this[option] == null) {
          this[option] = defaultValue;
        }
      }
    }

  };

  defaults = {
    // path to the directory containing content's to be scanned
    contents: './contents',
    // list of glob patterns to ignore
    ignore: [],
    // context variables, passed to views/templates
    locals: {},
    // list of modules/files to load as plugins
    plugins: [],
    // list of modules/files loaded and added to locals
    require: [],
    // path to the directory containing the templates
    templates: './templates',
    // directory to load custom views from
    views: './views',
    // built product goes here
    output: './build'
  };

  return Config;

}).call(this);

Config.fromFile = function(path, callback) {
  /* Read config from *path* as JSON and *callback* with a Config instance. */
  return async.waterfall([
    function(callback) {
      return fileExists(path,
    function(exists) {
        if (exists) {
          return readJSON(path,
    callback);
        } else {
          return callback(new Error(`Config file at '${path}' does not exist.`));
        }
      });
    },
    function(options,
    callback) {
      return callback(null,
    new Config(options));
    }
  ], callback);
};

Config.fromFileSync = function(path) {};

/* Read config from *path* as JSON return a Config instance. */
```

Response:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from
    views: './views'
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Prompt:
### config.coffee ###

fs = require 'fs'
path = require 'path'
async = require 'async'

{readJSON, readJSONSync, fileExists, fileExistsSync} = require './utils'
console.log fileExistsSync

class Config

  defaults =
    # path to the directory containing content's to be scanned
    contents: './contents'
    # list of glob patterns to ignore
    ignore: []
    # context variables, passed to views/templates
    locals: {}
    # list of modules/files to load as plugins
    plugins: []
    # list of modules/files loaded and added to locals
    require: []
    # path to the directory containing the templates
    templates: './templates'
    # directory to load custom views from

Response:
views: './views'
    # built product goes here
    output: './build'

  constructor: (options) ->
    for option, value of options
      this[option] = value
    for option, defaultValue of defaults
      this[option] ?= defaultValue

Config.fromFile = (path, callback) ->
  ### Read config from *path* as JSON and *callback* with a Config instance. ###
  async.waterfall [
    (callback) ->
      fileExists path, (exists) ->
        if exists
          readJSON path, callback
        else
          callback new Error "Config file at '#{ path }' does not exist."
    (options, callback) ->
      callback null, new Config options
  ], callback

Config.fromFileSync = (path) ->
  ### Read config from *path* as JSON return a Config instance. ###


Response:
hubspot.define 'hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], (_, Bucky, Spitfire) ->
  monitor = (root='requests') ->
    Spitfire.on 'failure', ->
      Bucky.count "#{ root }.spitfire.failure"

    Spitfire.on 'success', ->
      Bucky.count "#{ root }.spitfire.success"

    Spitfire.on 'resolve', ({deferred, timing, resp, options}) ->
      url = Bucky.requests.getFullUrl options.url
      key = Bucky.requests.urlToKey url, (options.type or 'GET'), root

      Bucky.timer.send key, (timing.complete - timing.enqueue)
      Bucky.timer.send "#{ key }.queued", (timing.request - timing.enqueue)
      Bucky.timer.send "#{ key }.pending", (timing.complete - timing.request)
      Bucky.timer.send "#{ key }.latency", (timing.complete - timing.request - resp.headers['x-spitfire-duration'])

      Bucky.count "#{ key }.#{ resp.status }"
      Bucky.count "#{ key }.spitfire"

  {monitor}


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
hubspot.define 'hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], (_, Bucky, Spitfire) ->
  monitor = (root='requests') ->
    Spitfire.on 'failure', ->
      Bucky.count "#{ root }.spitfire.failure"

    Spitfire.on 'success', ->
      Bucky.count "#{ root }.spitfire.success"

    Spitfire.on 'resolve', ({deferred, timing, resp, options}) ->
      url = Bucky.requests.getFullUrl options.url
      key = Bucky.requests.urlToKey url, (options.type or 'GET'), root

      Bucky.timer.send key, (timing.complete - timing.enqueue)
      Bucky.timer.send "#{ key }.queued", (timing.request - timing.enqueue)
      Bucky.timer.send "#{ key }.pending", (timing.complete - timing.request)
      Bucky.timer.send "#{ key }.latency", (timing.complete - timing.request - resp.headers['x-spitfire-duration'])

      Bucky.count "#{ key }.#{ resp.status }"
      Bucky.count "#{ key }.spitfire"

  {monitor}
```

Response:
hubspot.define('hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], function(_, Bucky, Spitfire) {
  var monitor;
  monitor = function(root = 'requests') {
    Spitfire.on('failure', function() {
      return Bucky.count(`${root}.spitfire.failure`);
    });
    Spitfire.on('success', function() {
      return Bucky.count(`${root}.spitfire.success`);
    });
    return Spitfire.on('resolve', function({deferred, timing, resp, options}) {
      var key, url;
      url = Bucky.requests.getFullUrl(options.url);
      key = Bucky.requests.urlToKey(url, options.type || 'GET', root);
      Bucky.timer.send(key, timing.complete - timing.enqueue);
      Bucky.timer.send(`${key}.queued`, timing.request - timing.enqueue);
      Bucky.timer.send(`${key}.pending`, timing.complete - timing.request);
      Bucky.timer.send(`${key}.latency`, timing.complete - timing.request - resp.headers['x-spitfire-duration']);
      Bucky.count(`${key}.${resp.status}`);
      return Bucky.count(`${key}.spitfire`);
    });
  };
  return {monitor};
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
hubspot.define('hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], function(_, Bucky, Spitfire) {
  var monitor;
  monitor = function(root = 'requests') {
    Spitfire.on('failure', function() {
      return Bucky.count(`${root}.spitfire.failure`);
    });
    Spitfire.on('success', function() {
      return Bucky.count(`${root}.spitfire.success`);
    });
    return Spitfire.on('resolve', function({deferred, timing, resp, options}) {
      var key, url;
      url = Bucky.requests.getFullUrl(options.url);
      key = Bucky.requests.urlToKey(url, options.type || 'GET', root);
      Bucky.timer.send(key, timing.complete - timing.enqueue);
      Bucky.timer.send(`${key}.queued`, timing.request - timing.enqueue);
      Bucky.timer.send(`${key}.pending`, timing.complete - timing.request);
      Bucky.timer.send(`${key}.latency`, timing.complete - timing.request - resp.headers['x-spitfire-duration']);
      Bucky.count(`${key}.${resp.status}`);
      return Bucky.count(`${key}.spitfire`);
    });
  };
  return {monitor};
});
```

Response:
hubspot.define 'hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], (_, Bucky, Spitfire) ->
  monitor = (root='requests') ->
    Spitfire.on 'failure', ->
      Bucky.count "#{ root }.spitfire.failure"

    Spitfire.on 'success', ->
      Bucky.count "#{ root }.spitfire.success"

    Spitfire.on 'resolve', ({deferred, timing, resp, options}) ->
      url = Bucky.requests.getFullUrl options.url
      key = Bucky.requests.urlToKey url, (options.type or 'GET'), root

      Bucky.timer.send key, (timing.complete - timing.enqueue)
      Bucky.timer.send "#{ key }.queued", (timing.request - timing.enqueue)
      Bucky.timer.send "#{ key }.pending", (timing.complete - timing.request)
      Bucky.timer.send "#{ key }.latency", (timing.complete - timing.request - resp.headers['x-spitfire-duration'])

      Bucky.count "#{ key }.#{ resp.status }"
      Bucky.count "#{ key }.spitfire"

  {monitor}


Prompt:
hubspot.define 'hubspot.bucky.spitfire', ['_', 'hubspot.bucky.client', 'hubspot.spitfire.client'], (_, Bucky, Spitfire) ->
  monitor = (root='requests') ->
    Spitfire.on 'failure', ->
      Bucky.count "#{ root }.spitfire.failure"

    Spitfire.on 'success', ->
      Bucky.count "#{ root }.spitfire.success"

    Spitfire.on 'resolve', ({deferred, timing, resp, options}) ->
      url = Bucky.requests.getFullUrl options.url

Response:
key = Bucky.requests.urlToKey url, (options.type or 'GET'), root

      Bucky.timer.send key, (timing.complete - timing.enqueue)
      Bucky.timer.send "#{ key }.queued", (timing.request - timing.enqueue)
      Bucky.timer.send "#{ key }.pending", (timing.complete - timing.request)
      Bucky.timer.send "#{ key }.latency", (timing.complete - timing.request - resp.headers['x-spitfire-duration'])

      Bucky.count "#{ key }.#{ resp.status }"
      Bucky.count "#{ key }.spitfire"

  {monitor}


Response:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on name, listener

		publish: publish
		subscribe: subscribe
	]


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on name, listener

		publish: publish
		subscribe: subscribe
	]
```

Response:
/*global define*/
define(['services/services'], function(services) {
  'use strict';
  return services.factory('message', [
    '$rootScope',
    function($rootScope) {
      var publish,
    subscribe;
      publish = function(name,
    parameters) {
        parameters.timeStamp = new Date();
        return $rootScope.$broadcast(name,
    parameters);
      };
      subscribe = function(name,
    listener) {
        return $rootScope.$on(name,
    listener);
      };
      return {
        publish: publish,
        subscribe: subscribe
      };
    }
  ]);
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['services/services'], function(services) {
  'use strict';
  return services.factory('message', [
    '$rootScope',
    function($rootScope) {
      var publish,
    subscribe;
      publish = function(name,
    parameters) {
        parameters.timeStamp = new Date();
        return $rootScope.$broadcast(name,
    parameters);
      };
      subscribe = function(name,
    listener) {
        return $rootScope.$on(name,
    listener);
      };
      return {
        publish: publish,
        subscribe: subscribe
      };
    }
  ]);
});
```

Response:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on name, listener

		publish: publish
		subscribe: subscribe
	]


Prompt:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

Response:
$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on name, listener

		publish: publish
		subscribe: subscribe
	]


Response:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on(name, listener)

		publish: publish
		subscribe: subscribe
	]


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on(name, listener)

		publish: publish
		subscribe: subscribe
	]
```

Response:
/*global define*/
define(['services/services'], function(services) {
  'use strict';
  return services.factory('message', [
    '$rootScope',
    function($rootScope) {
      var publish,
    subscribe;
      publish = function(name,
    parameters) {
        parameters.timeStamp = new Date();
        return $rootScope.$broadcast(name,
    parameters);
      };
      subscribe = function(name,
    listener) {
        return $rootScope.$on(name,
    listener);
      };
      return {
        publish: publish,
        subscribe: subscribe
      };
    }
  ]);
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['services/services'], function(services) {
  'use strict';
  return services.factory('message', [
    '$rootScope',
    function($rootScope) {
      var publish,
    subscribe;
      publish = function(name,
    parameters) {
        parameters.timeStamp = new Date();
        return $rootScope.$broadcast(name,
    parameters);
      };
      subscribe = function(name,
    listener) {
        return $rootScope.$on(name,
    listener);
      };
      return {
        publish: publish,
        subscribe: subscribe
      };
    }
  ]);
});
```

Response:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

			$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on(name, listener)

		publish: publish
		subscribe: subscribe
	]


Prompt:
###global define###

define ['services/services'], (services) ->
	'use strict'

	services.factory 'message', ['$rootScope', ($rootScope) ->
		publish = (name, parameters) ->
			parameters.timeStamp = new Date()

Response:
$rootScope.$broadcast(name, parameters)
		subscribe = (name, listener) ->
			$rootScope.$on(name, listener)

		publish: publish
		subscribe: subscribe
	]


Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n----------------------------\n"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n----------------------------\n"
```

Response:
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, result;
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref, results;
      ref = data.files;
      results = [];
      for (j = 0, len = ref.length; j < len; j++) {
        f = ref[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n----------------------------\n";
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, result;
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref, results;
      ref = data.files;
      results = [];
      for (j = 0, len = ref.length; j < len; j++) {
        f = ref[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n----------------------------\n";
};
```

Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n----------------------------\n"


Prompt:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

Response:
if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n----------------------------\n"


Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"
```

Response:
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, result;
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref, results;
      ref = data.files;
      results = [];
      for (j = 0, len = ref.length; j < len; j++) {
        f = ref[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, result;
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref, results;
      ref = data.files;
      results = [];
      for (j = 0, len = ref.length; j < len; j++) {
        f = ref[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};
```

Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

Response:
if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"
```

Response:
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};
```

Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

Response:
if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} \
              :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"
```

Response:
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.BrokenFiles, col)} :  ${String(badFiles.length).red}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};
```

Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails

Response:
return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.BrokenFiles, col} :  #{String(badFiles.length).red}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.Brokenfiles, col} :  #{badFiles.length}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.Brokenfiles, col} :  #{badFiles.length}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"
```

Response:
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.Brokenfiles, col)} :  ${badFiles.length}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var align, col, colors, helpers, i18n, sloc, stat;

sloc = require('../sloc');

i18n = require('../i18n');

helpers = require('../helpers');

align = helpers.alignRight;

col = 20;

colors = {
  source: "green",
  comment: "cyan",
  empty: "yellow"
};

stat = function(data, options) {
  var c, i, k, n, str, x;
  if (data.badFile) {
    return `${align(i18n.en.Error, col)} :  ${i18n.en.BadFile}`;
  }
  str = (function() {
    var j, len, ref, results;
    ref = options.keys;
    results = [];
    for (j = 0, len = ref.length; j < len; j++) {
      k = ref[j];
      if (!((x = data.stats[k]) != null)) {
        continue;
      }
      n = ((c = colors[k]) != null) && ((i = String(x)[c]) != null) ? i : x;
      results.push(`${align(i18n.en[k], col)} :  ${n}`);
    }
    return results;
  })();
  return str.join('\n');
};

module.exports = function(data, options = {}, fmtOpts) {
  var badFiles, bl, d, f, fileCount, ref, result;
  if (((ref = options.keys) != null ? ref.length : void 0) === 1 && !options.reportDetails) {
    return data.summary[options.keys[0]];
  }
  if (options.keys == null) {
    options.keys = sloc.keys;
  }
  result = `\n---------- ${i18n.en.Result} ------------\n\n`;
  result += stat({
    stats: data.summary
  }, options);
  badFiles = data.files.filter(function(x) {
    return x.badFile;
  });
  fileCount = data.files.length - badFiles.length;
  result += `\n\n${i18n.en.NumberOfFilesRead} :  ${fileCount}`;
  if (bl = badFiles.length > 0) {
    result += `\n${align(i18n.en.Brokenfiles, col)} :  ${badFiles.length}`;
  }
  if (options.details && data.files.length > 1) {
    result += `\n\n---------- ${i18n.en.Details} -----------\n`;
    d = (function() {
      var j, len, ref1, results;
      ref1 = data.files;
      results = [];
      for (j = 0, len = ref1.length; j < len; j++) {
        f = ref1[j];
        results.push(`\n\n--- ${f.path}\n\n${stat(f, options)}`);
      }
      return results;
    })();
    result += d.join('');
  }
  return result += "\n\n------------------------------\n";
};
```

Response:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails
    return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.Brokenfiles, col} :  #{badFiles.length}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"


Prompt:
sloc    = require '../sloc'
i18n    = require '../i18n'
helpers = require '../helpers'
align   = helpers.alignRight
col     = 20
colors  =
  source  : "green"
  comment : "cyan"
  empty   : "yellow"

stat = (data, options) ->

  if data.badFile
    return "#{align i18n.en.Error, col} :  #{i18n.en.BadFile}"

  str = for k in options.keys when (x = data.stats[k])?
    n = if (c = colors[k])? and (i = String(x)[c])? then i else x
    "#{align i18n.en[k], col} :  #{n}"

  str.join '\n'

module.exports = (data, options={}, fmtOpts) ->

  if options.keys?.length is 1 and not options.reportDetails

Response:
return data.summary[options.keys[0]]

  if not options.keys?
    options.keys = sloc.keys

  result = "\n---------- #{i18n.en.Result} ------------\n\n"

  result += stat {stats: data.summary}, options

  badFiles = data.files.filter (x) -> x.badFile

  fileCount = data.files.length - badFiles.length
  result += "\n\n#{i18n.en.NumberOfFilesRead} :  #{fileCount}"

  if bl = badFiles.length > 0
    result += "\n#{align i18n.en.Brokenfiles, col} :  #{badFiles.length}"

  if options.details and data.files.length > 1
    result += "\n\n---------- #{i18n.en.Details} -----------\n"
    d = for f in data.files
      "\n\n--- #{f.path}\n\n#{stat f, options}"

    result += d.join ''

  result += "\n\n------------------------------\n"