Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
describe('Selectors', function() {
  var engine;
  engine = null;
  before(function() {
    var container;
    container = document.createElement('div');
    engine = new GSS(container);
    return engine.compile(true);
  });
  return describe('dispatched by argument types', function() {
    it('should create command instance for each operation', function() {
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector.Selecter);
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector);
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector);
      return expect(engine.document.Command(['tag', ['tag', 'div'], 'div'])).to.be.an.instanceof(engine.document.Selector.Qualifier);
    });
    it('should have absolute and relative path set for each command', function() {
      expect(engine.document.Command(['tag', 'div']).path).to.eql('div');
      expect(engine.document.Command(['tag', 'h1']).key).to.eql('h1');
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).path).to.eql('p.active');
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).key).to.eql('.active');
      expect(engine.document.Command(['tag', ['+', ['.', ['tag', 'p'], 'active']], 'em']).path).to.eql('p.active+em');
      return expect(engine.document.Command(['[*=]', ['+', ['.', ['tag', 'p'], 'active']], 'em', 'v']).path).to.eql('p.active+[em*="v"]');
    });
    it('should group commands by tags', function() {
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).selector).to.eql(' #button');
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).path).to.eql('>p.active #button');
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).selector).to.eql('p.active');
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).path).to.eql('~~p.active');
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).selector).to.eql('p.active');
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).selector).to.eql(void 0);
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).path).to.eql('~~p.active!~');
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).head.command.path).to.eql('~~ p.active');
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).tail.command.path).to.eql('~~ ');
      return expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).selector).to.eql(' p.active');
    });
    return it('should group elements in comma', function() {
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).path).to.eql('p.active');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).selector).to.eql('p.active');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).tail.command.path).to.eql('p');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).head.command.path).to.eql('p.active');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).selector).to.eql('p.active,p');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).path).to.eql('p.active,p');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).path).to.eql('p.active,p~~');
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).selector).to.eql(void 0);
      expect(engine.document.Command([',', ['.', ['~~'], 'active'], ['.', ['++'], 'active']]).selector).to.eql(void 0);
      expect(engine.document.Command([',', ['.', 'a'], ['.', [' ', ['$']], 'b']]).selector).to.eql(void 0);
      return expect(engine.document.Command([',', ['.', 'a'], ['.', ['$'], 'b']]).selector).to.eql(void 0);
    });
  });
});
```

Response:
describe 'Selectors', ->
  engine = null
  before ->
    container = document.createElement('div')
    engine = new GSS(container)
    engine.compile(true)

  describe 'dispatched by argument types', ->
    it 'should create command instance for each operation', ->
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector.Selecter)
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector)
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector)
      expect(engine.document.Command(['tag', ['tag', 'div'], 'div'])).to.be.an.instanceof(engine.document.Selector.Qualifier)

    it 'should have absolute and relative path set for each command', ->
      expect(engine.document.Command(['tag', 'div']).path).to.eql('div')
      expect(engine.document.Command(['tag', 'h1']).key).to.eql('h1')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).path).to.eql('p.active')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).key).to.eql('.active')

      expect(engine.document.Command(['tag', ['+', ['.', ['tag', 'p'], 'active']], 'em']).path).to.eql('p.active+em')

      expect(engine.document.Command(['[*=]', ['+', ['.', ['tag', 'p'], 'active']], 'em', 'v']).path).to.eql('p.active+[em*="v"]')

    it 'should group commands by tags', ->
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).selector).to.eql(' #button')
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).path).to.eql('>p.active #button')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).selector).to.eql('p.active')
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).path).to.eql('~~p.active')
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).selector).to.eql('p.active')
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).selector).to.eql(undefined)
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).path).to.eql('~~p.active!~')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).head.command.path).to.eql('~~ p.active')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).tail.command.path).to.eql('~~ ')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).selector).to.eql(' p.active')

    it 'should group elements in comma', ->
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).path).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).selector).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).tail.command.path).to.eql('p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).head.command.path).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).selector).to.eql('p.active,p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).path).to.eql('p.active,p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).path).to.eql('p.active,p~~')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).selector).to.eql(undefined)

      expect(engine.document.Command([',', ['.', ['~~'], 'active'], ['.', ['++'], 'active']]).selector).to.eql(undefined)
      expect(engine.document.Command([',', ['.', 'a'], ['.', [' ', ['$']], 'b']]).selector).to.eql(undefined)
      expect(engine.document.Command([',', ['.', 'a'], ['.', ['$'], 'b']]).selector).to.eql(undefined)


Prompt:
describe 'Selectors', ->
  engine = null
  before ->
    container = document.createElement('div')
    engine = new GSS(container)
    engine.compile(true)

  describe 'dispatched by argument types', ->
    it 'should create command instance for each operation', ->
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector.Selecter)
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector)
      expect(engine.document.Command(['tag', 'div'])).to.be.an.instanceof(engine.document.Selector)
      expect(engine.document.Command(['tag', ['tag', 'div'], 'div'])).to.be.an.instanceof(engine.document.Selector.Qualifier)

    it 'should have absolute and relative path set for each command', ->
      expect(engine.document.Command(['tag', 'div']).path).to.eql('div')
      expect(engine.document.Command(['tag', 'h1']).key).to.eql('h1')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).path).to.eql('p.active')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).key).to.eql('.active')

      expect(engine.document.Command(['tag', ['+', ['.', ['tag', 'p'], 'active']], 'em']).path).to.eql('p.active+em')

      expect(engine.document.Command(['[*=]', ['+', ['.', ['tag', 'p'], 'active']], 'em', 'v']).path).to.eql('p.active+[em*="v"]')

Response:
it 'should group commands by tags', ->
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).selector).to.eql(' #button')
      expect(engine.document.Command(['#', [' ', ['.', ['tag', ['>'], 'p'], 'active']], 'button']).path).to.eql('>p.active #button')
      expect(engine.document.Command(['.', ['tag', 'p'], 'active']).selector).to.eql('p.active')
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).path).to.eql('~~p.active')
      expect(engine.document.Command(['.', ['tag', ['~~'], 'p'], 'active']).selector).to.eql('p.active')
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).selector).to.eql(undefined)
      expect(engine.document.Command(['!~', ['.', ['tag', ['~~'], 'p'], 'active']]).path).to.eql('~~p.active!~')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).head.command.path).to.eql('~~ p.active')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).tail.command.path).to.eql('~~ ')
      expect(engine.document.Command(['.', ['tag', [' ', ['~~']], 'p'], 'active']).selector).to.eql(' p.active')

    it 'should group elements in comma', ->
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).path).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).selector).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).tail.command.path).to.eql('p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active']]).head.command.path).to.eql('p.active')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).selector).to.eql('p.active,p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['tag', 'p']]).path).to.eql('p.active,p')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).path).to.eql('p.active,p~~')
      expect(engine.document.Command([',', ['.', ['tag', 'p'], 'active'], ['~~', ['tag', 'p']]]).selector).to.eql(undefined)

      expect(engine.document.Command([',', ['.', ['~~'], 'active'], ['.', ['++'], 'active']]).selector).to.eql(undefined)
      expect(engine.document.Command([',', ['.', 'a'], ['.', [' ', ['$']], 'b']]).selector).to.eql(undefined)
      expect(engine.document.Command([',', ['.', 'a'], ['.', ['$'], 'b']]).selector).to.eql(undefined)


Response:
LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'

module.exports = class LayerId extends LayerInfo
  @shouldParse: (key) -> key is 'shmd'

  parse: ->
    count = @file.readInt()

    for i in [0...count]
      @file.seek 4, true

      key = @file.readString(4)

      copyOnSheetDup = @file.readByte()
      @file.seek 3, true #padding

      len = @file.readInt()
      end = @file.tell() + len

      @parseLayerComps() if key is 'cmls'

      @file.seek end

  parseLayerComps: ->
    @file.seek 4, true
    @data.layerComp = new Descriptor(@file).parse()


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'

module.exports = class LayerId extends LayerInfo
  @shouldParse: (key) -> key is 'shmd'

  parse: ->
    count = @file.readInt()

    for i in [0...count]
      @file.seek 4, true

      key = @file.readString(4)

      copyOnSheetDup = @file.readByte()
      @file.seek 3, true #padding

      len = @file.readInt()
      end = @file.tell() + len

      @parseLayerComps() if key is 'cmls'

      @file.seek end

  parseLayerComps: ->
    @file.seek 4, true
    @data.layerComp = new Descriptor(@file).parse()
```

Response:
var Descriptor, LayerId, LayerInfo;

LayerInfo = require('../layer_info.coffee');

Descriptor = require('../descriptor.coffee');

module.exports = LayerId = class LayerId extends LayerInfo {
  static shouldParse(key) {
    return key === 'shmd';
  }

  parse() {
    var copyOnSheetDup, count, end, i, j, key, len, ref, results;
    count = this.file.readInt();
    results = [];
    for (i = j = 0, ref = count; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) {
      this.file.seek(4, true);
      key = this.file.readString(4);
      copyOnSheetDup = this.file.readByte();
      this.file.seek(3, true); //padding
      len = this.file.readInt();
      end = this.file.tell() + len;
      if (key === 'cmls') {
        this.parseLayerComps();
      }
      results.push(this.file.seek(end));
    }
    return results;
  }

  parseLayerComps() {
    this.file.seek(4, true);
    return this.data.layerComp = new Descriptor(this.file).parse();
  }

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Descriptor, LayerId, LayerInfo;

LayerInfo = require('../layer_info.coffee');

Descriptor = require('../descriptor.coffee');

module.exports = LayerId = class LayerId extends LayerInfo {
  static shouldParse(key) {
    return key === 'shmd';
  }

  parse() {
    var copyOnSheetDup, count, end, i, j, key, len, ref, results;
    count = this.file.readInt();
    results = [];
    for (i = j = 0, ref = count; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) {
      this.file.seek(4, true);
      key = this.file.readString(4);
      copyOnSheetDup = this.file.readByte();
      this.file.seek(3, true); //padding
      len = this.file.readInt();
      end = this.file.tell() + len;
      if (key === 'cmls') {
        this.parseLayerComps();
      }
      results.push(this.file.seek(end));
    }
    return results;
  }

  parseLayerComps() {
    this.file.seek(4, true);
    return this.data.layerComp = new Descriptor(this.file).parse();
  }

};
```

Response:
LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'

module.exports = class LayerId extends LayerInfo
  @shouldParse: (key) -> key is 'shmd'

  parse: ->
    count = @file.readInt()

    for i in [0...count]
      @file.seek 4, true

      key = @file.readString(4)

      copyOnSheetDup = @file.readByte()
      @file.seek 3, true #padding

      len = @file.readInt()
      end = @file.tell() + len

      @parseLayerComps() if key is 'cmls'

      @file.seek end

  parseLayerComps: ->
    @file.seek 4, true
    @data.layerComp = new Descriptor(@file).parse()


Prompt:
LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'

module.exports = class LayerId extends LayerInfo
  @shouldParse: (key) -> key is 'shmd'

  parse: ->
    count = @file.readInt()

    for i in [0...count]
      @file.seek 4, true

      key = @file.readString(4)

Response:
copyOnSheetDup = @file.readByte()
      @file.seek 3, true #padding

      len = @file.readInt()
      end = @file.tell() + len

      @parseLayerComps() if key is 'cmls'

      @file.seek end

  parseLayerComps: ->
    @file.seek 4, true
    @data.layerComp = new Descriptor(@file).parse()


Response:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'
logError = require 'logError'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return logError error if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'
logError = require 'logError'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return logError error if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END
```

Response:
var RedisThrottle, debug, logError, moment, redis;

debug = require('debug')('meshblu:RedisThrottle');

moment = require('moment');

redis = require('./redis');

logError = require('logError');

/*
 THIS DOESN'T WORK YET!!
*/
RedisThrottle = class RedisThrottle {
  constructor(name, rate) {
    this.rateLimit = this.rateLimit.bind(this);
    this.name = name;
    this.rate = rate;
    debug('constructor', this.name, this.rate);
  }

  rateLimit(id = "", callback = function() {}) {
    var key;
    key = `${this.name}:${id}:${moment().unix()}`;
    debug('rateLimit', callback);
    return redis.get(key, (error, value) => {
      if (value > 10) {
        return;
      }
      return redis.multi().incr(key, 1).expire(key, 10).exec((error) => {
        if (error != null) {
          return logError(error);
        }
        return callback();
      });
    });
  }

};

module.exports = RedisThrottle;

// FUNCTION LIMIT_API_CALL(ip)
// ts = CURRENT_UNIX_TIME()
// keyname = ip+":"+ts
// current = GET(keyname)
// IF current != NULL AND current > 10 THEN
//     ERROR "too many requests per second"
// ELSE
//     MULTI
//         INCR(keyname,1)
//         EXPIRE(keyname,10)
//     EXEC
//     PERFORM_API_CALL()
// END


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var RedisThrottle, debug, logError, moment, redis;

debug = require('debug')('meshblu:RedisThrottle');

moment = require('moment');

redis = require('./redis');

logError = require('logError');

/*
 THIS DOESN'T WORK YET!!
*/
RedisThrottle = class RedisThrottle {
  constructor(name, rate) {
    this.rateLimit = this.rateLimit.bind(this);
    this.name = name;
    this.rate = rate;
    debug('constructor', this.name, this.rate);
  }

  rateLimit(id = "", callback = function() {}) {
    var key;
    key = `${this.name}:${id}:${moment().unix()}`;
    debug('rateLimit', callback);
    return redis.get(key, (error, value) => {
      if (value > 10) {
        return;
      }
      return redis.multi().incr(key, 1).expire(key, 10).exec((error) => {
        if (error != null) {
          return logError(error);
        }
        return callback();
      });
    });
  }

};

module.exports = RedisThrottle;

// FUNCTION LIMIT_API_CALL(ip)
// ts = CURRENT_UNIX_TIME()
// keyname = ip+":"+ts
// current = GET(keyname)
// IF current != NULL AND current > 10 THEN
//     ERROR "too many requests per second"
// ELSE
//     MULTI
//         INCR(keyname,1)
//         EXPIRE(keyname,10)
//     EXEC
//     PERFORM_API_CALL()
// END
```

Response:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'
logError = require 'logError'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return logError error if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Prompt:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'
logError = require 'logError'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis

Response:
.multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return logError error if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Response:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return console.error error.stack if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return console.error error.stack if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END
```

Response:
var RedisThrottle, debug, moment, redis;

debug = require('debug')('meshblu:RedisThrottle');

moment = require('moment');

redis = require('./redis');

/*
 THIS DOESN'T WORK YET!!
*/
RedisThrottle = class RedisThrottle {
  constructor(name, rate) {
    this.rateLimit = this.rateLimit.bind(this);
    this.name = name;
    this.rate = rate;
    debug('constructor', this.name, this.rate);
  }

  rateLimit(id = "", callback = function() {}) {
    var key;
    key = `${this.name}:${id}:${moment().unix()}`;
    debug('rateLimit', callback);
    return redis.get(key, (error, value) => {
      if (value > 10) {
        return;
      }
      return redis.multi().incr(key, 1).expire(key, 10).exec((error) => {
        if (error != null) {
          return console.error(error.stack);
        }
        return callback();
      });
    });
  }

};

module.exports = RedisThrottle;

// FUNCTION LIMIT_API_CALL(ip)
// ts = CURRENT_UNIX_TIME()
// keyname = ip+":"+ts
// current = GET(keyname)
// IF current != NULL AND current > 10 THEN
//     ERROR "too many requests per second"
// ELSE
//     MULTI
//         INCR(keyname,1)
//         EXPIRE(keyname,10)
//     EXEC
//     PERFORM_API_CALL()
// END


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var RedisThrottle, debug, moment, redis;

debug = require('debug')('meshblu:RedisThrottle');

moment = require('moment');

redis = require('./redis');

/*
 THIS DOESN'T WORK YET!!
*/
RedisThrottle = class RedisThrottle {
  constructor(name, rate) {
    this.rateLimit = this.rateLimit.bind(this);
    this.name = name;
    this.rate = rate;
    debug('constructor', this.name, this.rate);
  }

  rateLimit(id = "", callback = function() {}) {
    var key;
    key = `${this.name}:${id}:${moment().unix()}`;
    debug('rateLimit', callback);
    return redis.get(key, (error, value) => {
      if (value > 10) {
        return;
      }
      return redis.multi().incr(key, 1).expire(key, 10).exec((error) => {
        if (error != null) {
          return console.error(error.stack);
        }
        return callback();
      });
    });
  }

};

module.exports = RedisThrottle;

// FUNCTION LIMIT_API_CALL(ip)
// ts = CURRENT_UNIX_TIME()
// keyname = ip+":"+ts
// current = GET(keyname)
// IF current != NULL AND current > 10 THEN
//     ERROR "too many requests per second"
// ELSE
//     MULTI
//         INCR(keyname,1)
//         EXPIRE(keyname,10)
//     EXEC
//     PERFORM_API_CALL()
// END
```

Response:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()
        .incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return console.error error.stack if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Prompt:
debug = require('debug')('meshblu:RedisThrottle')
moment = require 'moment'
redis = require './redis'

###
 THIS DOESN'T WORK YET!!
###

class RedisThrottle
  constructor: (@name, @rate) ->
    debug 'constructor', @name, @rate

  rateLimit: (id="", callback=->) =>
    key = "#{@name}:#{id}:#{moment().unix()}"
    debug 'rateLimit', callback

    redis.get key, (error, value) =>
      return if value > 10

      redis
        .multi()

Response:
.incr(key, 1)
        .expire(key, 10)
        .exec (error) =>
          return console.error error.stack if error?
          callback()

module.exports = RedisThrottle

# FUNCTION LIMIT_API_CALL(ip)
# ts = CURRENT_UNIX_TIME()
# keyname = ip+":"+ts
# current = GET(keyname)
# IF current != NULL AND current > 10 THEN
#     ERROR "too many requests per second"
# ELSE
#     MULTI
#         INCR(keyname,1)
#         EXPIRE(keyname,10)
#     EXEC
#     PERFORM_API_CALL()
# END


Response:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    multiLineComment:  ['/*', '*', '*/']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    multiLineComment:  ['/*', '*', '*/']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'
```

Response:
var LANGUAGES;

module.exports = LANGUAGES = {
  Markdown: {
    nameMatchers: ['.md'],
    commentsOnly: true
  },
  C: {
    nameMatchers: ['.c', '.h'],
    pygmentsLexer: 'c',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  CSharp: {
    nameMatchers: ['.cs'],
    pygmentsLexer: 'csharp',
    singleLineComment: ['//'],
    multiLineComment: ['/*', '*', '*/'],
    ignorePrefix: '}'
  },
  'C++': {
    nameMatchers: ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx'],
    pygmentsLexer: 'cpp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Clojure: {
    nameMatchers: ['.clj'],
    pygmentsLexer: 'clojure',
    singleLineComment: [';;'],
    ignorePrefix: '}'
  },
  CoffeeScript: {
    nameMatchers: ['.coffee', 'Cakefile'],
    pygmentsLexer: 'coffee-script',
    singleLineComment: ['#'],
    ignorePrefix: '}'
  },
  Go: {
    nameMatchers: ['.go'],
    pygmentsLexer: 'go',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Handlebars: {
    nameMatchers: ['.handlebars', '.hbs'],
    pygmentsLexer: 'html', // TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment: [
      '<!--',
      '',
      '-->', // HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',
      '',
      '}}' // Actual handlebars block comments
    ],
    ignorePrefix: '#'
  }
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var LANGUAGES;

module.exports = LANGUAGES = {
  Markdown: {
    nameMatchers: ['.md'],
    commentsOnly: true
  },
  C: {
    nameMatchers: ['.c', '.h'],
    pygmentsLexer: 'c',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  CSharp: {
    nameMatchers: ['.cs'],
    pygmentsLexer: 'csharp',
    singleLineComment: ['//'],
    multiLineComment: ['/*', '*', '*/'],
    ignorePrefix: '}'
  },
  'C++': {
    nameMatchers: ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx'],
    pygmentsLexer: 'cpp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Clojure: {
    nameMatchers: ['.clj'],
    pygmentsLexer: 'clojure',
    singleLineComment: [';;'],
    ignorePrefix: '}'
  },
  CoffeeScript: {
    nameMatchers: ['.coffee', 'Cakefile'],
    pygmentsLexer: 'coffee-script',
    singleLineComment: ['#'],
    ignorePrefix: '}'
  },
  Go: {
    nameMatchers: ['.go'],
    pygmentsLexer: 'go',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Handlebars: {
    nameMatchers: ['.handlebars', '.hbs'],
    pygmentsLexer: 'html', // TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment: [
      '<!--',
      '',
      '-->', // HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',
      '',
      '}}' // Actual handlebars block comments
    ],
    ignorePrefix: '#'
  }
};
```

Response:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    multiLineComment:  ['/*', '*', '*/']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Prompt:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    multiLineComment:  ['/*', '*', '*/']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:

Response:
nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Response:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'
```

Response:
var LANGUAGES;

module.exports = LANGUAGES = {
  Markdown: {
    nameMatchers: ['.md'],
    commentsOnly: true
  },
  C: {
    nameMatchers: ['.c', '.h'],
    pygmentsLexer: 'c',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  CSharp: {
    nameMatchers: ['.cs'],
    pygmentsLexer: 'csharp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  'C++': {
    nameMatchers: ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx'],
    pygmentsLexer: 'cpp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Clojure: {
    nameMatchers: ['.clj'],
    pygmentsLexer: 'clojure',
    singleLineComment: [';;'],
    ignorePrefix: '}'
  },
  CoffeeScript: {
    nameMatchers: ['.coffee', 'Cakefile'],
    pygmentsLexer: 'coffee-script',
    singleLineComment: ['#'],
    ignorePrefix: '}'
  },
  Go: {
    nameMatchers: ['.go'],
    pygmentsLexer: 'go',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Handlebars: {
    nameMatchers: ['.handlebars', '.hbs'],
    pygmentsLexer: 'html', // TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment: [
      '<!--',
      '',
      '-->', // HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',
      '',
      '}}' // Actual handlebars block comments
    ],
    ignorePrefix: '#'
  }
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var LANGUAGES;

module.exports = LANGUAGES = {
  Markdown: {
    nameMatchers: ['.md'],
    commentsOnly: true
  },
  C: {
    nameMatchers: ['.c', '.h'],
    pygmentsLexer: 'c',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  CSharp: {
    nameMatchers: ['.cs'],
    pygmentsLexer: 'csharp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  'C++': {
    nameMatchers: ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx'],
    pygmentsLexer: 'cpp',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Clojure: {
    nameMatchers: ['.clj'],
    pygmentsLexer: 'clojure',
    singleLineComment: [';;'],
    ignorePrefix: '}'
  },
  CoffeeScript: {
    nameMatchers: ['.coffee', 'Cakefile'],
    pygmentsLexer: 'coffee-script',
    singleLineComment: ['#'],
    ignorePrefix: '}'
  },
  Go: {
    nameMatchers: ['.go'],
    pygmentsLexer: 'go',
    singleLineComment: ['//'],
    ignorePrefix: '}'
  },
  Handlebars: {
    nameMatchers: ['.handlebars', '.hbs'],
    pygmentsLexer: 'html', // TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment: [
      '<!--',
      '',
      '-->', // HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',
      '',
      '}}' // Actual handlebars block comments
    ],
    ignorePrefix: '#'
  }
};
```

Response:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:
    nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Prompt:
module.exports = LANGUAGES =
  Markdown:
    nameMatchers: ['.md']
    commentsOnly: true

  C:
    nameMatchers:      ['.c', '.h']
    pygmentsLexer:     'c'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  CSharp:
    nameMatchers:      ['.cs']
    pygmentsLexer:     'csharp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  'C++':
    nameMatchers:      ['.cpp', '.hpp', '.c++', '.h++', '.cc', '.hh', '.cxx', '.hxx']
    pygmentsLexer:     'cpp'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Clojure:

Response:
nameMatchers:      ['.clj']
    pygmentsLexer:     'clojure'
    singleLineComment: [';;']
    ignorePrefix:      '}'

  CoffeeScript:
    nameMatchers:      ['.coffee', 'Cakefile']
    pygmentsLexer:     'coffee-script'
    singleLineComment: ['#']
    ignorePrefix:      '}'

  Go:
    nameMatchers:      ['.go']
    pygmentsLexer:     'go'
    singleLineComment: ['//']
    ignorePrefix:      '}'

  Handlebars:
    nameMatchers:      ['.handlebars', '.hbs']
    pygmentsLexer:     'html' # TODO: is there a handlebars/mustache lexer? Nope. Lame.
    multiLineComment:  [
      '<!--', '', '-->', # HTML block comments go first, for code highlighting / segment splitting purposes
      '{{!',  '', '}}'   # Actual handlebars block comments
    ]
    ignorePrefix:      '#'


Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        level: 'error'
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        level: 'error'
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )
```

Response:
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        level: 'error',
        colorize: true,
        timestamp: function() {
          return new Date().toLocaleString();
        },
        prettyPrint: true
      })
    ]
  })
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        level: 'error',
        colorize: true,
        timestamp: function() {
          return new Date().toLocaleString();
        },
        prettyPrint: true
      })
    ]
  })
};
```

Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        level: 'error'
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Prompt:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

Response:
logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        level: 'error'
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )
```

Response:
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        colorize: true,
        timestamp: function() {
          return new Date().toLocaleString();
        },
        prettyPrint: true
      })
    ]
  })
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        colorize: true,
        timestamp: function() {
          return new Date().toLocaleString();
        },
        prettyPrint: true
      })
    ]
  })
};
```

Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Prompt:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

Response:
logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: ->
          new Date().toLocaleString()
        prettyPrint: true
      )
    ]
  )


Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: true
        prettyPrint: true
      )
    ]
  )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: true
        prettyPrint: true
      )
    ]
  )
```

Response:
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        colorize: true,
        timestamp: true,
        prettyPrint: true
      })
    ]
  })
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var winston;

winston = require('winston');

module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  },
  logger: new winston.Logger({
    transports: [
      new winston.transports.Console({
        colorize: true,
        timestamp: true,
        prettyPrint: true
      })
    ]
  })
};
```

Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: true
        prettyPrint: true
      )
    ]
  )


Prompt:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

winston = require 'winston'

module.exports =
  extractType: (target) ->

Response:
Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()

  logger: new (winston.Logger) (
    transports: [
      new (winston.transports.Console)(
        colorize: true
        timestamp: true
        prettyPrint: true
      )
    ]
  )


Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()
```

Response:
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  }
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// parsing source

// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
module.exports = {
  extractType: function(target) {
    return Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase();
  }
};
```

Response:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()


Prompt:
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.

Response:
# <http://outsider.mit-license.org/>

module.exports =
  extractType: (target) ->
    Object.prototype.toString.call(target).replace('[object ', '').replace(']', '').toLowerCase()


Response:
suite 'Text Processing:', ->
  test 'Escape "', ->
    eq(
      xml('test8', {}, {}, { headless: true }).ele('node', '"').end()
      '<test8><node>"</node></test8>'
    )

  test 'Text node with empty string', ->
    eq(
      xml('test9', {}, {}, { headless: true }).text('').end()
      '<test9/>'
    )

  test 'Text node with empty string (pretty print)', ->
    eq(
      xml('test10', {}, {}, { headless: true }).text('').end()
      '<test10/>'
    )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'Text Processing:', ->
  test 'Escape "', ->
    eq(
      xml('test8', {}, {}, { headless: true }).ele('node', '"').end()
      '<test8><node>"</node></test8>'
    )

  test 'Text node with empty string', ->
    eq(
      xml('test9', {}, {}, { headless: true }).text('').end()
      '<test9/>'
    )

  test 'Text node with empty string (pretty print)', ->
    eq(
      xml('test10', {}, {}, { headless: true }).text('').end()
      '<test10/>'
    )
```

Response:
suite('Text Processing:', function() {
  test('Escape "', function() {
    return eq(xml('test8', {}, {}, {
      headless: true
    }).ele('node', '"').end(), '<test8><node>"</node></test8>');
  });
  test('Text node with empty string', function() {
    return eq(xml('test9', {}, {}, {
      headless: true
    }).text('').end(), '<test9/>');
  });
  return test('Text node with empty string (pretty print)', function() {
    return eq(xml('test10', {}, {}, {
      headless: true
    }).text('').end(), '<test10/>');
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
suite('Text Processing:', function() {
  test('Escape "', function() {
    return eq(xml('test8', {}, {}, {
      headless: true
    }).ele('node', '"').end(), '<test8><node>"</node></test8>');
  });
  test('Text node with empty string', function() {
    return eq(xml('test9', {}, {}, {
      headless: true
    }).text('').end(), '<test9/>');
  });
  return test('Text node with empty string (pretty print)', function() {
    return eq(xml('test10', {}, {}, {
      headless: true
    }).text('').end(), '<test10/>');
  });
});
```

Response:
suite 'Text Processing:', ->
  test 'Escape "', ->
    eq(
      xml('test8', {}, {}, { headless: true }).ele('node', '"').end()
      '<test8><node>"</node></test8>'
    )

  test 'Text node with empty string', ->
    eq(
      xml('test9', {}, {}, { headless: true }).text('').end()
      '<test9/>'
    )

  test 'Text node with empty string (pretty print)', ->
    eq(
      xml('test10', {}, {}, { headless: true }).text('').end()
      '<test10/>'
    )


Prompt:
suite 'Text Processing:', ->
  test 'Escape "', ->
    eq(
      xml('test8', {}, {}, { headless: true }).ele('node', '"').end()
      '<test8><node>"</node></test8>'
    )

  test 'Text node with empty string', ->
    eq(

Response:
xml('test9', {}, {}, { headless: true }).text('').end()
      '<test9/>'
    )

  test 'Text node with empty string (pretty print)', ->
    eq(
      xml('test10', {}, {}, { headless: true }).text('').end()
      '<test10/>'
    )


Response:
###
# Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
# to print out some debug information.
###

TransformerBase = require('../transformer_base')

TransformerBase::onBeforeEnter = (node) ->
  msg = "#{node.type}"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth, (if fn then "#{msg} *" else "#{msg}"), broken

TransformerBase::onBeforeExit = (node) ->
  msg = "#{node.type}Exit"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth+1, (if fn then "#{msg} *" else "#{msg}"), broken

# Prints the current node.
print = (depth, nodeType, message="") ->
  color = if (/\*$/.test(nodeType)) then 35 else 30
  prefix = "\u001b[#{color}m#{nodeType}\u001b[0m"
  indent = "\u001b[#{30 + (depth % 5)}m· \u001b[0m"

  console.log \
    Array(depth+1).join(indent) + prefix,
    message

# Checks if a certain AST is broken.
isBroken = (ast) ->
  output = require('util').inspect(ast, depth: 1000)
  if ~output.indexOf("[Circular]")
    "[Circular]"


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
# to print out some debug information.
###

TransformerBase = require('../transformer_base')

TransformerBase::onBeforeEnter = (node) ->
  msg = "#{node.type}"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth, (if fn then "#{msg} *" else "#{msg}"), broken

TransformerBase::onBeforeExit = (node) ->
  msg = "#{node.type}Exit"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth+1, (if fn then "#{msg} *" else "#{msg}"), broken

# Prints the current node.
print = (depth, nodeType, message="") ->
  color = if (/\*$/.test(nodeType)) then 35 else 30
  prefix = "\u001b[#{color}m#{nodeType}\u001b[0m"
  indent = "\u001b[#{30 + (depth % 5)}m· \u001b[0m"

  console.log \
    Array(depth+1).join(indent) + prefix,
    message

# Checks if a certain AST is broken.
isBroken = (ast) ->
  output = require('util').inspect(ast, depth: 1000)
  if ~output.indexOf("[Circular]")
    "[Circular]"
```

Response:
/*
 * Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
 * to print out some debug information.
 */
var TransformerBase, isBroken, print;

TransformerBase = require('../transformer_base');

TransformerBase.prototype.onBeforeEnter = function(node) {
  var broken, fn, msg;
  msg = `${node.type}`;
  fn = this[msg] != null;
  broken = isBroken(this.ast) || "";
  return print(this.depth, (fn ? `${msg} *` : `${msg}`), broken);
};

TransformerBase.prototype.onBeforeExit = function(node) {
  var broken, fn, msg;
  msg = `${node.type}Exit`;
  fn = this[msg] != null;
  broken = isBroken(this.ast) || "";
  return print(this.depth + 1, (fn ? `${msg} *` : `${msg}`), broken);
};

// Prints the current node.
print = function(depth, nodeType, message = "") {
  var color, indent, prefix;
  color = (/\*$/.test(nodeType)) ? 35 : 30;
  prefix = `\u001b[${color}m${nodeType}\u001b[0m`;
  indent = `\u001b[${30 + (depth % 5)}m· \u001b[0m`;
  return console.log(Array(depth + 1).join(indent) + prefix, message);
};

// Checks if a certain AST is broken.
isBroken = function(ast) {
  var output;
  output = require('util').inspect(ast, {
    depth: 1000
  });
  if (~output.indexOf("[Circular]")) {
    return "[Circular]";
  }
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*
 * Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
 * to print out some debug information.
 */
var TransformerBase, isBroken, print;

TransformerBase = require('../transformer_base');

TransformerBase.prototype.onBeforeEnter = function(node) {
  var broken, fn, msg;
  msg = `${node.type}`;
  fn = this[msg] != null;
  broken = isBroken(this.ast) || "";
  return print(this.depth, (fn ? `${msg} *` : `${msg}`), broken);
};

TransformerBase.prototype.onBeforeExit = function(node) {
  var broken, fn, msg;
  msg = `${node.type}Exit`;
  fn = this[msg] != null;
  broken = isBroken(this.ast) || "";
  return print(this.depth + 1, (fn ? `${msg} *` : `${msg}`), broken);
};

// Prints the current node.
print = function(depth, nodeType, message = "") {
  var color, indent, prefix;
  color = (/\*$/.test(nodeType)) ? 35 : 30;
  prefix = `\u001b[${color}m${nodeType}\u001b[0m`;
  indent = `\u001b[${30 + (depth % 5)}m· \u001b[0m`;
  return console.log(Array(depth + 1).join(indent) + prefix, message);
};

// Checks if a certain AST is broken.
isBroken = function(ast) {
  var output;
  output = require('util').inspect(ast, {
    depth: 1000
  });
  if (~output.indexOf("[Circular]")) {
    return "[Circular]";
  }
};
```

Response:
###
# Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
# to print out some debug information.
###

TransformerBase = require('../transformer_base')

TransformerBase::onBeforeEnter = (node) ->
  msg = "#{node.type}"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth, (if fn then "#{msg} *" else "#{msg}"), broken

TransformerBase::onBeforeExit = (node) ->
  msg = "#{node.type}Exit"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth+1, (if fn then "#{msg} *" else "#{msg}"), broken

# Prints the current node.
print = (depth, nodeType, message="") ->
  color = if (/\*$/.test(nodeType)) then 35 else 30
  prefix = "\u001b[#{color}m#{nodeType}\u001b[0m"
  indent = "\u001b[#{30 + (depth % 5)}m· \u001b[0m"

  console.log \
    Array(depth+1).join(indent) + prefix,
    message

# Checks if a certain AST is broken.
isBroken = (ast) ->
  output = require('util').inspect(ast, depth: 1000)
  if ~output.indexOf("[Circular]")
    "[Circular]"


Prompt:
###
# Debugging provisions. Run `before -> require('./lib/support/debug')` in tests
# to print out some debug information.
###

TransformerBase = require('../transformer_base')

TransformerBase::onBeforeEnter = (node) ->
  msg = "#{node.type}"
  fn = @[msg]?
  broken = isBroken(@ast) or ""
  print @depth, (if fn then "#{msg} *" else "#{msg}"), broken

TransformerBase::onBeforeExit = (node) ->
  msg = "#{node.type}Exit"
  fn = @[msg]?
  broken = isBroken(@ast) or ""

Response:
print @depth+1, (if fn then "#{msg} *" else "#{msg}"), broken

# Prints the current node.
print = (depth, nodeType, message="") ->
  color = if (/\*$/.test(nodeType)) then 35 else 30
  prefix = "\u001b[#{color}m#{nodeType}\u001b[0m"
  indent = "\u001b[#{30 + (depth % 5)}m· \u001b[0m"

  console.log \
    Array(depth+1).join(indent) + prefix,
    message

# Checks if a certain AST is broken.
isBroken = (ast) ->
  output = require('util').inspect(ast, depth: 1000)
  if ~output.indexOf("[Circular]")
    "[Circular]"


Response:
module.exports = (lineman) ->
  config:
    spec:
      files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
      options:
        growl: false


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
  config:
    spec:
      files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
      options:
        growl: false
```

Response:
module.exports = function(lineman) {
  return {
    config: {
      spec: {
        files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"],
        options: {
          growl: false
        }
      }
    }
  };
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
  return {
    config: {
      spec: {
        files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"],
        options: {
          growl: false
        }
      }
    }
  };
};
```

Response:
module.exports = (lineman) ->
  config:
    spec:
      files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
      options:
        growl: false


Prompt:
module.exports = (lineman) ->
  config:
    spec:

Response:
files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
      options:
        growl: false


Response:
module.exports = (lineman) ->
  config:
    files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
    options:
      growl: false


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
  config:
    files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
    options:
      growl: false
```

Response:
module.exports = function(lineman) {
  return {
    config: {
      files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"],
      options: {
        growl: false
      }
    }
  };
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
  return {
    config: {
      files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"],
      options: {
        growl: false
      }
    }
  };
};
```

Response:
module.exports = (lineman) ->
  config:
    files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
    options:
      growl: false


Prompt:
module.exports = (lineman) ->
  config:

Response:
files: ["<%= files.js.concatenated %>", "<%= files.js.concatenatedSpec %>"]
    options:
      growl: false


Response:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mediana":                             tpl.median(frFmt)
            "Diferencia":                          tpl.var(1, frFmt)
            "Desviación estándar de la muestra":            tpl.stdev(1, frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Primero":                                     tpl.first(frFmt),
            "Pasado":                                      tpl.last(frFmt),
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mediana":                             tpl.median(frFmt)
            "Diferencia":                          tpl.var(1, frFmt)
            "Desviación estándar de la muestra":            tpl.stdev(1, frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Primero":                                     tpl.first(frFmt),
            "Pasado":                                      tpl.last(frFmt),
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)
```

Response:
var callWithJQuery;

callWithJQuery = function(pivotModule) {
  if (typeof exports === "object" && typeof module === "object") { // CommonJS
    return pivotModule(require("jquery"));
  } else if (typeof define === "function" && define.amd) { // AMD
    return define(["jquery"], pivotModule);
  } else {
    // Plain browser env
    return pivotModule(jQuery);
  }
};

callWithJQuery(function($) {
  var frFmt, frFmtInt, frFmtPct, nf, tpl;
  nf = $.pivotUtilities.numberFormat;
  tpl = $.pivotUtilities.aggregatorTemplates;
  frFmt = nf({
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtInt = nf({
    digitsAfterDecimal: 0,
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtPct = nf({
    digitsAfterDecimal: 1,
    scaler: 100,
    suffix: "%",
    thousandsSep: " ",
    decimalSep: ","
  });
  return $.pivotUtilities.locales.es = {
    localeStrings: {
      renderError: "Ocurrió un error durante la interpretación de la tabla dinámica.",
      computeError: "Ocurrió un error durante el cálculo de la tabla dinámica.",
      uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica.",
      selectAll: "Seleccionar todo",
      selectNone: "Deseleccionar todo",
      tooMany: "(demasiados valores)",
      filterResults: "Filtrar resultados",
      totals: "Totales",
      vs: "vs",
      by: "por",
      apply: "Aplicar",
      cancel: "Cancelar"
    },
    aggregators: {
      "Cuenta": tpl.count(frFmtInt),
      "Cuenta de valores únicos": tpl.countUnique(frFmtInt),
      "Lista de valores únicos": tpl.listUnique(", "),
      "Suma": tpl.sum(frFmt),
      "Suma de enteros": tpl.sum(frFmtInt),
      "Promedio": tpl.average(frFmt),
      "Mediana": tpl.median(frFmt),
      "Diferencia": tpl.var(1, frFmt),
      "Desviación estándar de la muestra": tpl.stdev(1, frFmt),
      "Mínimo": tpl.min(frFmt),
      "Máximo": tpl.max(frFmt),
      "Primero": tpl.first(frFmt),
      "Pasado": tpl.last(frFmt),
      "Suma de sumas": tpl.sumOverSum(frFmt),
      "Cota 80% superior": tpl.sumOverSumBound80(true, frFmt),
      "Cota 80% inferior": tpl.sumOverSumBound80(false, frFmt)
    }
  };
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var callWithJQuery;

callWithJQuery = function(pivotModule) {
  if (typeof exports === "object" && typeof module === "object") { // CommonJS
    return pivotModule(require("jquery"));
  } else if (typeof define === "function" && define.amd) { // AMD
    return define(["jquery"], pivotModule);
  } else {
    // Plain browser env
    return pivotModule(jQuery);
  }
};

callWithJQuery(function($) {
  var frFmt, frFmtInt, frFmtPct, nf, tpl;
  nf = $.pivotUtilities.numberFormat;
  tpl = $.pivotUtilities.aggregatorTemplates;
  frFmt = nf({
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtInt = nf({
    digitsAfterDecimal: 0,
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtPct = nf({
    digitsAfterDecimal: 1,
    scaler: 100,
    suffix: "%",
    thousandsSep: " ",
    decimalSep: ","
  });
  return $.pivotUtilities.locales.es = {
    localeStrings: {
      renderError: "Ocurrió un error durante la interpretación de la tabla dinámica.",
      computeError: "Ocurrió un error durante el cálculo de la tabla dinámica.",
      uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica.",
      selectAll: "Seleccionar todo",
      selectNone: "Deseleccionar todo",
      tooMany: "(demasiados valores)",
      filterResults: "Filtrar resultados",
      totals: "Totales",
      vs: "vs",
      by: "por",
      apply: "Aplicar",
      cancel: "Cancelar"
    },
    aggregators: {
      "Cuenta": tpl.count(frFmtInt),
      "Cuenta de valores únicos": tpl.countUnique(frFmtInt),
      "Lista de valores únicos": tpl.listUnique(", "),
      "Suma": tpl.sum(frFmt),
      "Suma de enteros": tpl.sum(frFmtInt),
      "Promedio": tpl.average(frFmt),
      "Mediana": tpl.median(frFmt),
      "Diferencia": tpl.var(1, frFmt),
      "Desviación estándar de la muestra": tpl.stdev(1, frFmt),
      "Mínimo": tpl.min(frFmt),
      "Máximo": tpl.max(frFmt),
      "Primero": tpl.first(frFmt),
      "Pasado": tpl.last(frFmt),
      "Suma de sumas": tpl.sumOverSum(frFmt),
      "Cota 80% superior": tpl.sumOverSumBound80(true, frFmt),
      "Cota 80% inferior": tpl.sumOverSumBound80(false, frFmt)
    }
  };
});
```

Response:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mediana":                             tpl.median(frFmt)
            "Diferencia":                          tpl.var(1, frFmt)
            "Desviación estándar de la muestra":            tpl.stdev(1, frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Primero":                                     tpl.first(frFmt),
            "Pasado":                                      tpl.last(frFmt),
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)


Prompt:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"

Response:
tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mediana":                             tpl.median(frFmt)
            "Diferencia":                          tpl.var(1, frFmt)
            "Desviación estándar de la muestra":            tpl.stdev(1, frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Primero":                                     tpl.first(frFmt),
            "Pasado":                                      tpl.last(frFmt),
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)


Response:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)
            "Proporción del total (suma)":      tpl.fractionOf(tpl.sum(),   "total", frFmtPct)
            "Proporción de la fila (suma)":    tpl.fractionOf(tpl.sum(),   "row",   frFmtPct)
            "Proporción de la columna (suma)":  tpl.fractionOf(tpl.sum(),   "col",   frFmtPct)
            "Proporción del total (cuenta)":     tpl.fractionOf(tpl.count(), "total", frFmtPct)
            "Proporción de la fila (cuenta)":   tpl.fractionOf(tpl.count(), "row",   frFmtPct)


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)
            "Proporción del total (suma)":      tpl.fractionOf(tpl.sum(),   "total", frFmtPct)
            "Proporción de la fila (suma)":    tpl.fractionOf(tpl.sum(),   "row",   frFmtPct)
            "Proporción de la columna (suma)":  tpl.fractionOf(tpl.sum(),   "col",   frFmtPct)
            "Proporción del total (cuenta)":     tpl.fractionOf(tpl.count(), "total", frFmtPct)
            "Proporción de la fila (cuenta)":   tpl.fractionOf(tpl.count(), "row",   frFmtPct)
```

Response:
var callWithJQuery;

callWithJQuery = function(pivotModule) {
  if (typeof exports === "object" && typeof module === "object") { // CommonJS
    return pivotModule(require("jquery"));
  } else if (typeof define === "function" && define.amd) { // AMD
    return define(["jquery"], pivotModule);
  } else {
    // Plain browser env
    return pivotModule(jQuery);
  }
};

callWithJQuery(function($) {
  var frFmt, frFmtInt, frFmtPct, nf, tpl;
  nf = $.pivotUtilities.numberFormat;
  tpl = $.pivotUtilities.aggregatorTemplates;
  frFmt = nf({
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtInt = nf({
    digitsAfterDecimal: 0,
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtPct = nf({
    digitsAfterDecimal: 1,
    scaler: 100,
    suffix: "%",
    thousandsSep: " ",
    decimalSep: ","
  });
  return $.pivotUtilities.locales.es = {
    localeStrings: {
      renderError: "Ocurrió un error durante la interpretación de la tabla dinámica.",
      computeError: "Ocurrió un error durante el cálculo de la tabla dinámica.",
      uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica.",
      selectAll: "Seleccionar todo",
      selectNone: "Deseleccionar todo",
      tooMany: "(demasiados valores)",
      filterResults: "Filtrar resultados",
      totals: "Totales",
      vs: "vs",
      by: "por",
      apply: "Aplicar",
      cancel: "Cancelar"
    },
    aggregators: {
      "Cuenta": tpl.count(frFmtInt),
      "Cuenta de valores únicos": tpl.countUnique(frFmtInt),
      "Lista de valores únicos": tpl.listUnique(", "),
      "Suma": tpl.sum(frFmt),
      "Suma de enteros": tpl.sum(frFmtInt),
      "Promedio": tpl.average(frFmt),
      "Mínimo": tpl.min(frFmt),
      "Máximo": tpl.max(frFmt),
      "Suma de sumas": tpl.sumOverSum(frFmt),
      "Cota 80% superior": tpl.sumOverSumBound80(true, frFmt),
      "Cota 80% inferior": tpl.sumOverSumBound80(false, frFmt),
      "Proporción del total (suma)": tpl.fractionOf(tpl.sum(), "total", frFmtPct),
      "Proporción de la fila (suma)": tpl.fractionOf(tpl.sum(), "row", frFmtPct),
      "Proporción de la columna (suma)": tpl.fractionOf(tpl.sum(), "col", frFmtPct),
      "Proporción del total (cuenta)": tpl.fractionOf(tpl.count(), "total", frFmtPct),
      "Proporción de la fila (cuenta)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
    }
  };
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var callWithJQuery;

callWithJQuery = function(pivotModule) {
  if (typeof exports === "object" && typeof module === "object") { // CommonJS
    return pivotModule(require("jquery"));
  } else if (typeof define === "function" && define.amd) { // AMD
    return define(["jquery"], pivotModule);
  } else {
    // Plain browser env
    return pivotModule(jQuery);
  }
};

callWithJQuery(function($) {
  var frFmt, frFmtInt, frFmtPct, nf, tpl;
  nf = $.pivotUtilities.numberFormat;
  tpl = $.pivotUtilities.aggregatorTemplates;
  frFmt = nf({
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtInt = nf({
    digitsAfterDecimal: 0,
    thousandsSep: " ",
    decimalSep: ","
  });
  frFmtPct = nf({
    digitsAfterDecimal: 1,
    scaler: 100,
    suffix: "%",
    thousandsSep: " ",
    decimalSep: ","
  });
  return $.pivotUtilities.locales.es = {
    localeStrings: {
      renderError: "Ocurrió un error durante la interpretación de la tabla dinámica.",
      computeError: "Ocurrió un error durante el cálculo de la tabla dinámica.",
      uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica.",
      selectAll: "Seleccionar todo",
      selectNone: "Deseleccionar todo",
      tooMany: "(demasiados valores)",
      filterResults: "Filtrar resultados",
      totals: "Totales",
      vs: "vs",
      by: "por",
      apply: "Aplicar",
      cancel: "Cancelar"
    },
    aggregators: {
      "Cuenta": tpl.count(frFmtInt),
      "Cuenta de valores únicos": tpl.countUnique(frFmtInt),
      "Lista de valores únicos": tpl.listUnique(", "),
      "Suma": tpl.sum(frFmt),
      "Suma de enteros": tpl.sum(frFmtInt),
      "Promedio": tpl.average(frFmt),
      "Mínimo": tpl.min(frFmt),
      "Máximo": tpl.max(frFmt),
      "Suma de sumas": tpl.sumOverSum(frFmt),
      "Cota 80% superior": tpl.sumOverSumBound80(true, frFmt),
      "Cota 80% inferior": tpl.sumOverSumBound80(false, frFmt),
      "Proporción del total (suma)": tpl.fractionOf(tpl.sum(), "total", frFmtPct),
      "Proporción de la fila (suma)": tpl.fractionOf(tpl.sum(), "row", frFmtPct),
      "Proporción de la columna (suma)": tpl.fractionOf(tpl.sum(), "col", frFmtPct),
      "Proporción del total (cuenta)": tpl.fractionOf(tpl.count(), "total", frFmtPct),
      "Proporción de la fila (cuenta)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
    }
  };
});
```

Response:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"
            tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)
            "Proporción del total (suma)":      tpl.fractionOf(tpl.sum(),   "total", frFmtPct)
            "Proporción de la fila (suma)":    tpl.fractionOf(tpl.sum(),   "row",   frFmtPct)
            "Proporción de la columna (suma)":  tpl.fractionOf(tpl.sum(),   "col",   frFmtPct)
            "Proporción del total (cuenta)":     tpl.fractionOf(tpl.count(), "total", frFmtPct)
            "Proporción de la fila (cuenta)":   tpl.fractionOf(tpl.count(), "row",   frFmtPct)