Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Copies all enumerable own properties from `sources` to `target`
var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
  hasProp = {}.hasOwnProperty;

assign = function(target, ...sources) {
  var i, key, len, source;
  if (isFunction(Object.assign)) {
    Object.assign.apply(null, arguments);
  } else {
    for (i = 0, len = sources.length; i < len; i++) {
      source = sources[i];
      if (source != null) {
        for (key in source) {
          if (!hasProp.call(source, key)) continue;
          target[key] = source[key];
        }
      }
    }
  }
  return target;
};

// Determines if `val` is a Function object
isFunction = function(val) {
  return !!val && Object.prototype.toString.call(val) === '[object Function]';
};

// Determines if `val` is an Object
isObject = function(val) {
  var ref;
  return !!val && ((ref = typeof val) === 'function' || ref === 'object');
};

// Determines if `val` is an Array
isArray = function(val) {
  if (isFunction(Array.isArray)) {
    return Array.isArray(val);
  } else {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
};

// Determines if `val` is an empty Array or an Object with no own properties
isEmpty = function(val) {
  var key;
  if (isArray(val)) {
    return !val.length;
  } else {
    for (key in val) {
      if (!hasProp.call(val, key)) continue;
      return false;
    }
    return true;
  }
};

// Determines if `val` is a plain Object
isPlainObject = function(val) {
  var ctor, proto;
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
};

// Gets the primitive value of an object
getValue = function(obj) {
  if (isFunction(obj.valueOf)) {
    return obj.valueOf();
  } else {
    return obj;
  }
};
```

Response:
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Gets the primitive value of an object
getValue = (obj) ->
  if isFunction obj.valueOf
    obj.valueOf()
  else
    obj


Prompt:
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

Response:
# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Gets the primitive value of an object
getValue = (obj) ->
  if isFunction obj.valueOf
    obj.valueOf()
  else
    obj


Response:
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject
```

Response:
// Copies all enumerable own properties from `sources` to `target`
var assign, isArray, isEmpty, isFunction, isObject, isPlainObject,
  hasProp = {}.hasOwnProperty;

assign = function(target, ...sources) {
  var i, key, len, source;
  if (isFunction(Object.assign)) {
    Object.assign.apply(null, arguments);
  } else {
    for (i = 0, len = sources.length; i < len; i++) {
      source = sources[i];
      if (source != null) {
        for (key in source) {
          if (!hasProp.call(source, key)) continue;
          target[key] = source[key];
        }
      }
    }
  }
  return target;
};

// Determines if `val` is a Function object
isFunction = function(val) {
  return !!val && Object.prototype.toString.call(val) === '[object Function]';
};

// Determines if `val` is an Object
isObject = function(val) {
  var ref;
  return !!val && ((ref = typeof val) === 'function' || ref === 'object');
};

// Determines if `val` is an Array
isArray = function(val) {
  if (isFunction(Array.isArray)) {
    return Array.isArray(val);
  } else {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
};

// Determines if `val` is an empty Array or an Object with no own properties
isEmpty = function(val) {
  var key;
  if (isArray(val)) {
    return !val.length;
  } else {
    for (key in val) {
      if (!hasProp.call(val, key)) continue;
      return false;
    }
    return true;
  }
};

// Determines if `val` is a plain Object
isPlainObject = function(val) {
  var ctor, proto;
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Copies all enumerable own properties from `sources` to `target`
var assign, isArray, isEmpty, isFunction, isObject, isPlainObject,
  hasProp = {}.hasOwnProperty;

assign = function(target, ...sources) {
  var i, key, len, source;
  if (isFunction(Object.assign)) {
    Object.assign.apply(null, arguments);
  } else {
    for (i = 0, len = sources.length; i < len; i++) {
      source = sources[i];
      if (source != null) {
        for (key in source) {
          if (!hasProp.call(source, key)) continue;
          target[key] = source[key];
        }
      }
    }
  }
  return target;
};

// Determines if `val` is a Function object
isFunction = function(val) {
  return !!val && Object.prototype.toString.call(val) === '[object Function]';
};

// Determines if `val` is an Object
isObject = function(val) {
  var ref;
  return !!val && ((ref = typeof val) === 'function' || ref === 'object');
};

// Determines if `val` is an Array
isArray = function(val) {
  if (isFunction(Array.isArray)) {
    return Array.isArray(val);
  } else {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
};

// Determines if `val` is an empty Array or an Object with no own properties
isEmpty = function(val) {
  var key;
  if (isArray(val)) {
    return !val.length;
  } else {
    for (key in val) {
      if (!hasProp.call(val, key)) continue;
      return false;
    }
    return true;
  }
};

// Determines if `val` is a plain Object
isPlainObject = function(val) {
  var ctor, proto;
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;
```

Response:
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject


Prompt:
# Copies all enumerable own properties from `sources` to `target`
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

Response:
# Determines if `val` is an empty Array or an Object with no own properties
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject


Response:
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object
```

Response:
var assign,
  hasProp = {}.hasOwnProperty;

assign = function(target, ...sources) {
  var i, key, len, source;
  if (isFunction(Object.assign)) {
    Object.assign.apply(null, arguments);
  } else {
    for (i = 0, len = sources.length; i < len; i++) {
      source = sources[i];
      if (source != null) {
        for (key in source) {
          if (!hasProp.call(source, key)) continue;
          target[key] = source[key];
        }
      }
    }
  }
  return target;
};

// Determines if `val` is a Function object


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var assign,
  hasProp = {}.hasOwnProperty;

assign = function(target, ...sources) {
  var i, key, len, source;
  if (isFunction(Object.assign)) {
    Object.assign.apply(null, arguments);
  } else {
    for (i = 0, len = sources.length; i < len; i++) {
      source = sources[i];
      if (source != null) {
        for (key in source) {
          if (!hasProp.call(source, key)) continue;
          target[key] = source[key];
        }
      }
    }
  }
  return target;
};

// Determines if `val` is a Function object
```

Response:
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?
      target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object


Prompt:
assign = (target, sources...) ->
  if isFunction Object.assign
    Object.assign.apply null, arguments
  else
    for source in sources when source?

Response:
target[key] = source[key] for own key of source

  return target

# Determines if `val` is a Function object


Response:
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object
```

Response:
var isFunction;

isFunction = function(val) {
  return !!val && Object.prototype.toString.call(val) === '[object Function]';
};

// Determines if `val` is an Object


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

isFunction = function(val) {
  return !!val && Object.prototype.toString.call(val) === '[object Function]';
};

// Determines if `val` is an Object
```

Response:
isFunction = (val) ->
  !!val and Object.prototype.toString.call(val) is '[object Function]'

# Determines if `val` is an Object


Response:
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array
```

Response:
var isObject;

isObject = function(val) {
  var ref;
  return !!val && ((ref = typeof val) === 'function' || ref === 'object');
};

// Determines if `val` is an Array


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

isObject = function(val) {
  var ref;
  return !!val && ((ref = typeof val) === 'function' || ref === 'object');
};

// Determines if `val` is an Array
```

Response:
isObject = (val) ->
  !!val and typeof val in ['function', 'object']

# Determines if `val` is an Array


Response:
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties
```

Response:
var isArray;

isArray = function(val) {
  if (isFunction(Array.isArray)) {
    return Array.isArray(val);
  } else {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
};

// Determines if `val` is an empty Array or an Object with no own properties


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

isArray = function(val) {
  if (isFunction(Array.isArray)) {
    return Array.isArray(val);
  } else {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
};

// Determines if `val` is an empty Array or an Object with no own properties
```

Response:
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val
  else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties


Prompt:
isArray = (val) ->
  if isFunction Array.isArray
     Array.isArray val

Response:
else
    Object.prototype.toString.call(val) is '[object Array]'

# Determines if `val` is an empty Array or an Object with no own properties


Response:
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object
```

Response:
var isEmpty,
  hasProp = {}.hasOwnProperty;

isEmpty = function(val) {
  var key;
  if (isArray(val)) {
    return !val.length;
  } else {
    for (key in val) {
      if (!hasProp.call(val, key)) continue;
      return false;
    }
    return true;
  }
};

// Determines if `val` is a plain Object


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var isEmpty,
  hasProp = {}.hasOwnProperty;

isEmpty = function(val) {
  var key;
  if (isArray(val)) {
    return !val.length;
  } else {
    for (key in val) {
      if (!hasProp.call(val, key)) continue;
      return false;
    }
    return true;
  }
};

// Determines if `val` is a plain Object
```

Response:
isEmpty = (val) ->
  if isArray val
    return !val.length
  else
    for own key of val
      return false
    return true

# Determines if `val` is a plain Object


Prompt:
isEmpty = (val) ->
  if isArray val
    return !val.length
  else

Response:
for own key of val
      return false
    return true

# Determines if `val` is a plain Object


Response:
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Splits the given string into words


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Splits the given string into words
```

Response:
var isPlainObject;

isPlainObject = function(val) {
  var ctor, proto;
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
};

// Splits the given string into words


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

isPlainObject = function(val) {
  var ctor, proto;
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
};

// Splits the given string into words
```

Response:
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and
    (typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Splits the given string into words


Prompt:
isPlainObject = (val) ->
  isObject(val) and
    (proto = Object.getPrototypeOf val) and
    (ctor = proto.constructor) and

Response:
(typeof ctor is 'function') and
    (ctor instanceof ctor) and
    (Function.prototype.toString.call(ctor) is Function.prototype.toString.call(Object))

# Splits the given string into words


Response:
words = (val) ->
  (val.split(/[-_\s]+|(?=[A-Z][a-z])/) or []).filter((n) -> !!n)

# Converts the string to camel case


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
words = (val) ->
  (val.split(/[-_\s]+|(?=[A-Z][a-z])/) or []).filter((n) -> !!n)

# Converts the string to camel case
```

Response:
var words;

words = function(val) {
  return (val.split(/[-_\s]+|(?=[A-Z][a-z])/) || []).filter(function(n) {
    return !!n;
  });
};

// Converts the string to camel case


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

words = function(val) {
  return (val.split(/[-_\s]+|(?=[A-Z][a-z])/) || []).filter(function(n) {
    return !!n;
  });
};

// Converts the string to camel case
```

Response:
words = (val) ->
  (val.split(/[-_\s]+|(?=[A-Z][a-z])/) or []).filter((n) -> !!n)

# Converts the string to camel case


Response:
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to title case


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to title case
```

Response:
var camelCase;

camelCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += index ? capitalize(word.toLowerCase()) : word.toLowerCase();
  }
  return r;
};

// Converts the string to title case


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

camelCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += index ? capitalize(word.toLowerCase()) : word.toLowerCase();
  }
  return r;
};

// Converts the string to title case
```

Response:
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to title case


Prompt:
camelCase = (val) ->
  r = ''
  for word, index in words(val)

Response:
r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to title case


Response:
titleCase = (val) ->
  r = ''
  for word, index in words(val)
    r += capitalize(word.toLowerCase())
  return r

# Converts the string to kebab case


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
titleCase = (val) ->
  r = ''
  for word, index in words(val)
    r += capitalize(word.toLowerCase())
  return r

# Converts the string to kebab case
```

Response:
var titleCase;

titleCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += capitalize(word.toLowerCase());
  }
  return r;
};

// Converts the string to kebab case


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

titleCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += capitalize(word.toLowerCase());
  }
  return r;
};

// Converts the string to kebab case
```

Response:
titleCase = (val) ->
  r = ''
  for word, index in words(val)
    r += capitalize(word.toLowerCase())
  return r

# Converts the string to kebab case


Prompt:
titleCase = (val) ->
  r = ''
  for word, index in words(val)

Response:
r += capitalize(word.toLowerCase())
  return r

# Converts the string to kebab case


Response:
kebabCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '-' else '') + word.toLowerCase()
  return r

# Converts the string to snake case


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
kebabCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '-' else '') + word.toLowerCase()
  return r

# Converts the string to snake case
```

Response:
var kebabCase;

kebabCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += (index ? '-' : '') + word.toLowerCase();
  }
  return r;
};

// Converts the string to snake case


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

kebabCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += (index ? '-' : '') + word.toLowerCase();
  }
  return r;
};

// Converts the string to snake case
```

Response:
kebabCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '-' else '') + word.toLowerCase()
  return r

# Converts the string to snake case


Prompt:
kebabCase = (val) ->
  r = ''
  for word, index in words(val)

Response:
r += (if index then '-' else '') + word.toLowerCase()
  return r

# Converts the string to snake case


Response:
snakeCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '_' else '') + word.toLowerCase()
  return r

# Capitalize the first letter of the string


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
snakeCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '_' else '') + word.toLowerCase()
  return r

# Capitalize the first letter of the string
```

Response:
var snakeCase;

snakeCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += (index ? '_' : '') + word.toLowerCase();
  }
  return r;
};

// Capitalize the first letter of the string


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

snakeCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += (index ? '_' : '') + word.toLowerCase();
  }
  return r;
};

// Capitalize the first letter of the string
```

Response:
snakeCase = (val) ->
  r = ''
  for word, index in words(val)
    r += (if index then '_' else '') + word.toLowerCase()
  return r

# Capitalize the first letter of the string


Prompt:
snakeCase = (val) ->
  r = ''
  for word, index in words(val)

Response:
r += (if index then '_' else '') + word.toLowerCase()
  return r

# Capitalize the first letter of the string


Response:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.titleCase = titleCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.titleCase = titleCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words
```

Response:
var capitalize;

capitalize = function(val) {
  return val.charAt(0).toUpperCase() + val.slice(1);
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;

module.exports.camelCase = camelCase;

module.exports.titleCase = titleCase;

module.exports.kebabCase = kebabCase;

module.exports.snakeCase = snakeCase;

module.exports.capitalize = capitalize;

module.exports.words = words;


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

capitalize = function(val) {
  return val.charAt(0).toUpperCase() + val.slice(1);
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;

module.exports.camelCase = camelCase;

module.exports.titleCase = titleCase;

module.exports.kebabCase = kebabCase;

module.exports.snakeCase = snakeCase;

module.exports.capitalize = capitalize;

module.exports.words = words;
```

Response:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.titleCase = titleCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Prompt:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray

Response:
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.titleCase = titleCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Response:
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to kebab case


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to kebab case
```

Response:
var camelCase;

camelCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += index ? capitalize(word.toLowerCase()) : word.toLowerCase();
  }
  return r;
};

// Converts the string to kebab case


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

camelCase = function(val) {
  var i, index, len, r, ref, word;
  r = '';
  ref = words(val);
  for (index = i = 0, len = ref.length; i < len; index = ++i) {
    word = ref[index];
    r += index ? capitalize(word.toLowerCase()) : word.toLowerCase();
  }
  return r;
};

// Converts the string to kebab case
```

Response:
camelCase = (val) ->
  r = ''
  for word, index in words(val)
    r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to kebab case


Prompt:
camelCase = (val) ->
  r = ''
  for word, index in words(val)

Response:
r += if index then capitalize(word.toLowerCase()) else word.toLowerCase()
  return r

# Converts the string to kebab case


Response:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words
```

Response:
var capitalize;

capitalize = function(val) {
  return val.charAt(0).toUpperCase() + val.slice(1);
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;

module.exports.camelCase = camelCase;

module.exports.kebabCase = kebabCase;

module.exports.snakeCase = snakeCase;

module.exports.capitalize = capitalize;

module.exports.words = words;


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

capitalize = function(val) {
  return val.charAt(0).toUpperCase() + val.slice(1);
};

module.exports.assign = assign;

module.exports.isFunction = isFunction;

module.exports.isObject = isObject;

module.exports.isArray = isArray;

module.exports.isEmpty = isEmpty;

module.exports.isPlainObject = isPlainObject;

module.exports.camelCase = camelCase;

module.exports.kebabCase = kebabCase;

module.exports.snakeCase = snakeCase;

module.exports.capitalize = capitalize;

module.exports.words = words;
```

Response:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Prompt:
capitalize = (val) ->
  val.charAt(0).toUpperCase() + val.slice(1);

module.exports.assign = assign
module.exports.isFunction = isFunction
module.exports.isObject = isObject
module.exports.isArray = isArray

Response:
module.exports.isEmpty = isEmpty
module.exports.isPlainObject = isPlainObject

module.exports.camelCase = camelCase
module.exports.kebabCase = kebabCase
module.exports.snakeCase = snakeCase
module.exports.capitalize = capitalize
module.exports.words = words


Response:
class TransformerBase
  @run: (ast, options) ->
    new this(ast, options).run()

  constructor: (@ast, @options) ->
    @scopes = []
    @ctx = { vars: [] }

  ###*
  # run():
  # Runs estraverse on `@ast`, and invokes functions on enter and exit
  # depending on the node type. This is also in change of changing `@depth`,
  # `@node`, `@controller` (etc) every step of the way.
  #
  #     Transformer.run(ast)
  #     # roughly equivalent to: new Transformer(ast).run()
  ###

  run: ->
    @recurse @ast

  ###*
  # recurse():
  # Delegate function of `run()`. See [run()] for details.
  #
  # This is sometimes called on its own to recurse down a certain path which
  # will otherwise be skipped.
  ###

  recurse: (root) ->
    self = this
    @depth = 0

    runner = (direction, node, parent) =>
      @node   = node
      @depth += if direction is 'Enter' then +1 else -1
      fnName  = if direction is 'Enter' \
        then "#{node.type}" else "#{node.type}Exit"

      @["onBefore#{direction}"]?(node)
      result = @[fnName]?(node, parent)
      @["on#{direction}"]?(node)
      result

    @estraverse().replace root,
      enter: (node, parent) ->
        self.controller = this
        runner("Enter", node, parent)
      leave: (node, parent) ->
        runner("Exit", node, parent)


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
class TransformerBase
  @run: (ast, options) ->
    new this(ast, options).run()

  constructor: (@ast, @options) ->
    @scopes = []
    @ctx = { vars: [] }

  ###*
  # run():
  # Runs estraverse on `@ast`, and invokes functions on enter and exit
  # depending on the node type. This is also in change of changing `@depth`,
  # `@node`, `@controller` (etc) every step of the way.
  #
  #     Transformer.run(ast)
  #     # roughly equivalent to: new Transformer(ast).run()
  ###

  run: ->
    @recurse @ast

  ###*
  # recurse():
  # Delegate function of `run()`. See [run()] for details.
  #
  # This is sometimes called on its own to recurse down a certain path which
  # will otherwise be skipped.
  ###

  recurse: (root) ->
    self = this
    @depth = 0

    runner = (direction, node, parent) =>
      @node   = node
      @depth += if direction is 'Enter' then +1 else -1
      fnName  = if direction is 'Enter' \
        then "#{node.type}" else "#{node.type}Exit"

      @["onBefore#{direction}"]?(node)
      result = @[fnName]?(node, parent)
      @["on#{direction}"]?(node)
      result

    @estraverse().replace root,
      enter: (node, parent) ->
        self.controller = this
        runner("Enter", node, parent)
      leave: (node, parent) ->
        runner("Exit", node, parent)
```

Response:
var TransformerBase;

TransformerBase = class TransformerBase {
  static run(ast, options) {
    return new this(ast, options).run();
  }

  constructor(ast1, options1) {
    this.ast = ast1;
    this.options = options1;
    this.scopes = [];
    this.ctx = {
      vars: []
    };
  }

  /**
   * run():
   * Runs estraverse on `@ast`, and invokes functions on enter and exit
   * depending on the node type. This is also in change of changing `@depth`,
   * `@node`, `@controller` (etc) every step of the way.
   *
   *     Transformer.run(ast)
   *     # roughly equivalent to: new Transformer(ast).run()
   */
  run() {
    return this.recurse(this.ast);
  }

  /**
   * recurse():
   * Delegate function of `run()`. See [run()] for details.
   *
   * This is sometimes called on its own to recurse down a certain path which
   * will otherwise be skipped.
   */
  recurse(root) {
    var runner, self;
    self = this;
    this.depth = 0;
    runner = (direction, node, parent) => {
      var fnName, name, name1, result;
      this.node = node;
      this.depth += direction === 'Enter' ? +1 : -1;
      fnName = direction === 'Enter' ? `${node.type}` : `${node.type}Exit`;
      if (typeof this[name = `onBefore${direction}`] === "function") {
        this[name](node);
      }
      result = typeof this[fnName] === "function" ? this[fnName](node, parent) : void 0;
      if (typeof this[name1 = `on${direction}`] === "function") {
        this[name1](node);
      }
      return result;
    };
    return this.estraverse().replace(root, {
      enter: function(node, parent) {
        self.controller = this;
        return runner("Enter", node, parent);
      },
      leave: function(node, parent) {
        return runner("Exit", node, parent);
      }
    });
  }

};


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

TransformerBase = class TransformerBase {
  static run(ast, options) {
    return new this(ast, options).run();
  }

  constructor(ast1, options1) {
    this.ast = ast1;
    this.options = options1;
    this.scopes = [];
    this.ctx = {
      vars: []
    };
  }

  /**
   * run():
   * Runs estraverse on `@ast`, and invokes functions on enter and exit
   * depending on the node type. This is also in change of changing `@depth`,
   * `@node`, `@controller` (etc) every step of the way.
   *
   *     Transformer.run(ast)
   *     # roughly equivalent to: new Transformer(ast).run()
   */
  run() {
    return this.recurse(this.ast);
  }

  /**
   * recurse():
   * Delegate function of `run()`. See [run()] for details.
   *
   * This is sometimes called on its own to recurse down a certain path which
   * will otherwise be skipped.
   */
  recurse(root) {
    var runner, self;
    self = this;
    this.depth = 0;
    runner = (direction, node, parent) => {
      var fnName, name, name1, result;
      this.node = node;
      this.depth += direction === 'Enter' ? +1 : -1;
      fnName = direction === 'Enter' ? `${node.type}` : `${node.type}Exit`;
      if (typeof this[name = `onBefore${direction}`] === "function") {
        this[name](node);
      }
      result = typeof this[fnName] === "function" ? this[fnName](node, parent) : void 0;
      if (typeof this[name1 = `on${direction}`] === "function") {
        this[name1](node);
      }
      return result;
    };
    return this.estraverse().replace(root, {
      enter: function(node, parent) {
        self.controller = this;
        return runner("Enter", node, parent);
      },
      leave: function(node, parent) {
        return runner("Exit", node, parent);
      }
    });
  }

};
```

Response:
class TransformerBase
  @run: (ast, options) ->
    new this(ast, options).run()

  constructor: (@ast, @options) ->
    @scopes = []
    @ctx = { vars: [] }

  ###*
  # run():
  # Runs estraverse on `@ast`, and invokes functions on enter and exit
  # depending on the node type. This is also in change of changing `@depth`,
  # `@node`, `@controller` (etc) every step of the way.
  #
  #     Transformer.run(ast)
  #     # roughly equivalent to: new Transformer(ast).run()
  ###

  run: ->
    @recurse @ast

  ###*
  # recurse():
  # Delegate function of `run()`. See [run()] for details.
  #
  # This is sometimes called on its own to recurse down a certain path which
  # will otherwise be skipped.
  ###

  recurse: (root) ->
    self = this
    @depth = 0

    runner = (direction, node, parent) =>
      @node   = node
      @depth += if direction is 'Enter' then +1 else -1
      fnName  = if direction is 'Enter' \
        then "#{node.type}" else "#{node.type}Exit"

      @["onBefore#{direction}"]?(node)
      result = @[fnName]?(node, parent)
      @["on#{direction}"]?(node)
      result

    @estraverse().replace root,
      enter: (node, parent) ->
        self.controller = this
        runner("Enter", node, parent)
      leave: (node, parent) ->
        runner("Exit", node, parent)


Prompt:
class TransformerBase
  @run: (ast, options) ->
    new this(ast, options).run()

  constructor: (@ast, @options) ->
    @scopes = []
    @ctx = { vars: [] }

  ###*
  # run():
  # Runs estraverse on `@ast`, and invokes functions on enter and exit
  # depending on the node type. This is also in change of changing `@depth`,
  # `@node`, `@controller` (etc) every step of the way.
  #
  #     Transformer.run(ast)
  #     # roughly equivalent to: new Transformer(ast).run()
  ###

  run: ->
    @recurse @ast

  ###*
  # recurse():
  # Delegate function of `run()`. See [run()] for details.
  #

Response:
# This is sometimes called on its own to recurse down a certain path which
  # will otherwise be skipped.
  ###

  recurse: (root) ->
    self = this
    @depth = 0

    runner = (direction, node, parent) =>
      @node   = node
      @depth += if direction is 'Enter' then +1 else -1
      fnName  = if direction is 'Enter' \
        then "#{node.type}" else "#{node.type}Exit"

      @["onBefore#{direction}"]?(node)
      result = @[fnName]?(node, parent)
      @["on#{direction}"]?(node)
      result

    @estraverse().replace root,
      enter: (node, parent) ->
        self.controller = this
        runner("Enter", node, parent)
      leave: (node, parent) ->
        runner("Exit", node, parent)


Response:
root

  ###*
  # skip():
  # Skips a certain node from being parsed.
  #
  #     class MyTransform extends TransformerBase
  #       Identifier: ->
  #         @skip()
  ###

  skip: ->
    @controller?.skip()

  ###*
  # estraverse():
  # Returns `estraverse`.
  #
  #     @estraverse().replace ast, ...
  ###

  estraverse: ->
    @_estraverse ?= do ->
      es = require('estraverse')
      es.VisitorKeys.CoffeeEscapedExpression = []
      es.VisitorKeys.CoffeeListExpression = []
      es.VisitorKeys.CoffeePrototypeExpression = []
      es.VisitorKeys.CoffeeLoopStatement = []
      es.VisitorKeys.BlockComment = []
      es.VisitorKeys.LineComment = []
      es

  ###*
  # pushStack() : @pushStack(node)
  # Pushes a scope to the scope stack. Every time the scope changes, `@scope`
  # and `@ctx` gets changed.
  ###

  pushStack: (node) ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    @scopes.push [ node, @ctx ]
    @ctx = clone(@ctx)
    @scope = node
    @onScopeEnter?(@scope, @ctx, oldScope, oldCtx)

  popStack: () ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    [ @scope, @ctx ] = @scopes.pop()
    @onScopeExit?(@scope, @ctx, oldScope, oldCtx)


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
root

  ###*
  # skip():
  # Skips a certain node from being parsed.
  #
  #     class MyTransform extends TransformerBase
  #       Identifier: ->
  #         @skip()
  ###

  skip: ->
    @controller?.skip()

  ###*
  # estraverse():
  # Returns `estraverse`.
  #
  #     @estraverse().replace ast, ...
  ###

  estraverse: ->
    @_estraverse ?= do ->
      es = require('estraverse')
      es.VisitorKeys.CoffeeEscapedExpression = []
      es.VisitorKeys.CoffeeListExpression = []
      es.VisitorKeys.CoffeePrototypeExpression = []
      es.VisitorKeys.CoffeeLoopStatement = []
      es.VisitorKeys.BlockComment = []
      es.VisitorKeys.LineComment = []
      es

  ###*
  # pushStack() : @pushStack(node)
  # Pushes a scope to the scope stack. Every time the scope changes, `@scope`
  # and `@ctx` gets changed.
  ###

  pushStack: (node) ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    @scopes.push [ node, @ctx ]
    @ctx = clone(@ctx)
    @scope = node
    @onScopeEnter?(@scope, @ctx, oldScope, oldCtx)

  popStack: () ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    [ @scope, @ctx ] = @scopes.pop()
    @onScopeExit?(@scope, @ctx, oldScope, oldCtx)
```

Response:
root({
  /**
   * skip():
   * Skips a certain node from being parsed.
   *
   *     class MyTransform extends TransformerBase
   *       Identifier: ->
   *         @skip()
   */
  skip: function() {
    var ref;
    return (ref = this.controller) != null ? ref.skip() : void 0;
  },
  /**
   * estraverse():
   * Returns `estraverse`.
   *
   *     @estraverse().replace ast, ...
   */
  estraverse: function() {
    return this._estraverse != null ? this._estraverse : this._estraverse = (function() {
      var es;
      es = require('estraverse');
      es.VisitorKeys.CoffeeEscapedExpression = [];
      es.VisitorKeys.CoffeeListExpression = [];
      es.VisitorKeys.CoffeePrototypeExpression = [];
      es.VisitorKeys.CoffeeLoopStatement = [];
      es.VisitorKeys.BlockComment = [];
      es.VisitorKeys.LineComment = [];
      return es;
    })();
  },
  /**
   * pushStack() : @pushStack(node)
   * Pushes a scope to the scope stack. Every time the scope changes, `@scope`
   * and `@ctx` gets changed.
   */
  pushStack: function(node) {
    var oldCtx, oldScope;
    [oldScope, oldCtx] = [this.scope, this.ctx];
    this.scopes.push([node, this.ctx]);
    this.ctx = clone(this.ctx);
    this.scope = node;
    return typeof this.onScopeEnter === "function" ? this.onScopeEnter(this.scope, this.ctx, oldScope, oldCtx) : void 0;
  },
  popStack: function() {
    var oldCtx, oldScope;
    [oldScope, oldCtx] = [this.scope, this.ctx];
    [this.scope, this.ctx] = this.scopes.pop();
    return typeof this.onScopeExit === "function" ? this.onScopeExit(this.scope, this.ctx, oldScope, oldCtx) : void 0;
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
root({
  /**
   * skip():
   * Skips a certain node from being parsed.
   *
   *     class MyTransform extends TransformerBase
   *       Identifier: ->
   *         @skip()
   */
  skip: function() {
    var ref;
    return (ref = this.controller) != null ? ref.skip() : void 0;
  },
  /**
   * estraverse():
   * Returns `estraverse`.
   *
   *     @estraverse().replace ast, ...
   */
  estraverse: function() {
    return this._estraverse != null ? this._estraverse : this._estraverse = (function() {
      var es;
      es = require('estraverse');
      es.VisitorKeys.CoffeeEscapedExpression = [];
      es.VisitorKeys.CoffeeListExpression = [];
      es.VisitorKeys.CoffeePrototypeExpression = [];
      es.VisitorKeys.CoffeeLoopStatement = [];
      es.VisitorKeys.BlockComment = [];
      es.VisitorKeys.LineComment = [];
      return es;
    })();
  },
  /**
   * pushStack() : @pushStack(node)
   * Pushes a scope to the scope stack. Every time the scope changes, `@scope`
   * and `@ctx` gets changed.
   */
  pushStack: function(node) {
    var oldCtx, oldScope;
    [oldScope, oldCtx] = [this.scope, this.ctx];
    this.scopes.push([node, this.ctx]);
    this.ctx = clone(this.ctx);
    this.scope = node;
    return typeof this.onScopeEnter === "function" ? this.onScopeEnter(this.scope, this.ctx, oldScope, oldCtx) : void 0;
  },
  popStack: function() {
    var oldCtx, oldScope;
    [oldScope, oldCtx] = [this.scope, this.ctx];
    [this.scope, this.ctx] = this.scopes.pop();
    return typeof this.onScopeExit === "function" ? this.onScopeExit(this.scope, this.ctx, oldScope, oldCtx) : void 0;
  }
});
```

Response:
root

  ###*
  # skip():
  # Skips a certain node from being parsed.
  #
  #     class MyTransform extends TransformerBase
  #       Identifier: ->
  #         @skip()
  ###

  skip: ->
    @controller?.skip()

  ###*
  # estraverse():
  # Returns `estraverse`.
  #
  #     @estraverse().replace ast, ...
  ###

  estraverse: ->
    @_estraverse ?= do ->
      es = require('estraverse')
      es.VisitorKeys.CoffeeEscapedExpression = []
      es.VisitorKeys.CoffeeListExpression = []
      es.VisitorKeys.CoffeePrototypeExpression = []
      es.VisitorKeys.CoffeeLoopStatement = []
      es.VisitorKeys.BlockComment = []
      es.VisitorKeys.LineComment = []
      es

  ###*
  # pushStack() : @pushStack(node)
  # Pushes a scope to the scope stack. Every time the scope changes, `@scope`
  # and `@ctx` gets changed.
  ###

  pushStack: (node) ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    @scopes.push [ node, @ctx ]
    @ctx = clone(@ctx)
    @scope = node
    @onScopeEnter?(@scope, @ctx, oldScope, oldCtx)

  popStack: () ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    [ @scope, @ctx ] = @scopes.pop()
    @onScopeExit?(@scope, @ctx, oldScope, oldCtx)


Prompt:
root

  ###*
  # skip():
  # Skips a certain node from being parsed.
  #
  #     class MyTransform extends TransformerBase
  #       Identifier: ->
  #         @skip()
  ###

  skip: ->
    @controller?.skip()

  ###*
  # estraverse():
  # Returns `estraverse`.
  #
  #     @estraverse().replace ast, ...
  ###

  estraverse: ->
    @_estraverse ?= do ->
      es = require('estraverse')

Response:
es.VisitorKeys.CoffeeEscapedExpression = []
      es.VisitorKeys.CoffeeListExpression = []
      es.VisitorKeys.CoffeePrototypeExpression = []
      es.VisitorKeys.CoffeeLoopStatement = []
      es.VisitorKeys.BlockComment = []
      es.VisitorKeys.LineComment = []
      es

  ###*
  # pushStack() : @pushStack(node)
  # Pushes a scope to the scope stack. Every time the scope changes, `@scope`
  # and `@ctx` gets changed.
  ###

  pushStack: (node) ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    @scopes.push [ node, @ctx ]
    @ctx = clone(@ctx)
    @scope = node
    @onScopeEnter?(@scope, @ctx, oldScope, oldCtx)

  popStack: () ->
    [ oldScope, oldCtx ] = [ @scope, @ctx ]
    [ @scope, @ctx ] = @scopes.pop()
    @onScopeExit?(@scope, @ctx, oldScope, oldCtx)


Response:
###*
  # syntaxError() : @syntaxError(node, message)
  # Throws a syntax error for the given `node` with a given `message`.
  #
  #     @syntaxError node, "Not supported"
  ###

  syntaxError: (node, description) ->
    err = buildError(
      lineNumber: node.loc?.start?.line,
      column: node.loc?.start?.column,
      description: description
    , @options.source, @options.filename)
    throw err

  ###*
  # Defaults: these are default handlers that will automatially change `@scope`.
  ###

  Program: (node) ->
    @pushStack node
    node

  ProgramExit: (node) ->
    @popStack()
    node

  FunctionExpression: (node) ->
    @pushStack node.body
    node

  FunctionExpressionExit: (node) ->
    @popStack()
    node


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###*
  # syntaxError() : @syntaxError(node, message)
  # Throws a syntax error for the given `node` with a given `message`.
  #
  #     @syntaxError node, "Not supported"
  ###

  syntaxError: (node, description) ->
    err = buildError(
      lineNumber: node.loc?.start?.line,
      column: node.loc?.start?.column,
      description: description
    , @options.source, @options.filename)
    throw err

  ###*
  # Defaults: these are default handlers that will automatially change `@scope`.
  ###

  Program: (node) ->
    @pushStack node
    node

  ProgramExit: (node) ->
    @popStack()
    node

  FunctionExpression: (node) ->
    @pushStack node.body
    node

  FunctionExpressionExit: (node) ->
    @popStack()
    node
```

Response:
/**
 * syntaxError() : @syntaxError(node, message)
 * Throws a syntax error for the given `node` with a given `message`.
 *
 *     @syntaxError node, "Not supported"
 */
({
  syntaxError: function(node, description) {
    var err, ref, ref1, ref2, ref3;
    err = buildError({
      lineNumber: (ref = node.loc) != null ? (ref1 = ref.start) != null ? ref1.line : void 0 : void 0,
      column: (ref2 = node.loc) != null ? (ref3 = ref2.start) != null ? ref3.column : void 0 : void 0,
      description: description
    }, this.options.source, this.options.filename);
    throw err;
  },
  /**
   * Defaults: these are default handlers that will automatially change `@scope`.
   */
  Program: function(node) {
    this.pushStack(node);
    return node;
  },
  ProgramExit: function(node) {
    this.popStack();
    return node;
  },
  FunctionExpression: function(node) {
    this.pushStack(node.body);
    return node;
  },
  FunctionExpressionExit: function(node) {
    this.popStack();
    return node;
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/**
 * syntaxError() : @syntaxError(node, message)
 * Throws a syntax error for the given `node` with a given `message`.
 *
 *     @syntaxError node, "Not supported"
 */
({
  syntaxError: function(node, description) {
    var err, ref, ref1, ref2, ref3;
    err = buildError({
      lineNumber: (ref = node.loc) != null ? (ref1 = ref.start) != null ? ref1.line : void 0 : void 0,
      column: (ref2 = node.loc) != null ? (ref3 = ref2.start) != null ? ref3.column : void 0 : void 0,
      description: description
    }, this.options.source, this.options.filename);
    throw err;
  },
  /**
   * Defaults: these are default handlers that will automatially change `@scope`.
   */
  Program: function(node) {
    this.pushStack(node);
    return node;
  },
  ProgramExit: function(node) {
    this.popStack();
    return node;
  },
  FunctionExpression: function(node) {
    this.pushStack(node.body);
    return node;
  },
  FunctionExpressionExit: function(node) {
    this.popStack();
    return node;
  }
});
```

Response:
###*
  # syntaxError() : @syntaxError(node, message)
  # Throws a syntax error for the given `node` with a given `message`.
  #
  #     @syntaxError node, "Not supported"
  ###

  syntaxError: (node, description) ->
    err = buildError(
      lineNumber: node.loc?.start?.line,
      column: node.loc?.start?.column,
      description: description
    , @options.source, @options.filename)
    throw err

  ###*
  # Defaults: these are default handlers that will automatially change `@scope`.
  ###

  Program: (node) ->
    @pushStack node
    node

  ProgramExit: (node) ->
    @popStack()
    node

  FunctionExpression: (node) ->
    @pushStack node.body
    node

  FunctionExpressionExit: (node) ->
    @popStack()
    node


Prompt:
###*
  # syntaxError() : @syntaxError(node, message)
  # Throws a syntax error for the given `node` with a given `message`.
  #
  #     @syntaxError node, "Not supported"
  ###

  syntaxError: (node, description) ->
    err = buildError(
      lineNumber: node.loc?.start?.line,
      column: node.loc?.start?.column,
      description: description
    , @options.source, @options.filename)
    throw err

  ###*
  # Defaults: these are default handlers that will automatially change `@scope`.

Response:
###

  Program: (node) ->
    @pushStack node
    node

  ProgramExit: (node) ->
    @popStack()
    node

  FunctionExpression: (node) ->
    @pushStack node.body
    node

  FunctionExpressionExit: (node) ->
    @popStack()
    node


Response:
module.exports = React.createClass
  displayName: 'message-rich-image'

  mixins: [ PureRenderMixin ]

  propTypes:
    # attachment = {
    #   data:
    #     thumbnailUrl: string
    #     imageHeight: number
    #     imageWidth: number
    #   isUploading: boolean
    #   progress: boolean
    # }
    attachment: T.instanceOf(Immutable.Map).isRequired
    widthBoundary: T.number
    heightBoundary: T.number
    onClick: T.func
    onLoaded: T.func

  getDefaultProps: ->
    widthBoundary: 360
    heightBoundary: 360

  onClick: ->
    @props.onClick?()

  onLoaded: ->
    @props.onLoaded?()

  renderPreview: ->
    thumbnailUrl = @props.attachment.getIn ['data', 'thumbnailUrl']
    imageHeight = @props.attachment.getIn ['data', 'imageHeight']
    imageWidth = @props.attachment.getIn ['data', 'imageWidth']

    insideX = imageWidth <= @props.widthBoundary
    insideY = imageHeight <= @props.heightBoundary

    if insideX and insideY
      previewWidth = imageWidth
      previewHeight = imageHeight
    else
      boundaryRatio = @props.widthBoundary / @props.heightBoundary
      realRatio = imageWidth / imageHeight

      if boundaryRatio > realRatio # boundary is wider, use height as base
        previewHeight = @props.heightBoundary
        previewWidth = Math.round(@props.heightBoundary / imageHeight * imageWidth)
      else
        previewWidth = @props.widthBoundary


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
  displayName: 'message-rich-image'

  mixins: [ PureRenderMixin ]

  propTypes:
    # attachment = {
    #   data:
    #     thumbnailUrl: string
    #     imageHeight: number
    #     imageWidth: number
    #   isUploading: boolean
    #   progress: boolean
    # }
    attachment: T.instanceOf(Immutable.Map).isRequired
    widthBoundary: T.number
    heightBoundary: T.number
    onClick: T.func
    onLoaded: T.func

  getDefaultProps: ->
    widthBoundary: 360
    heightBoundary: 360

  onClick: ->
    @props.onClick?()

  onLoaded: ->
    @props.onLoaded?()

  renderPreview: ->
    thumbnailUrl = @props.attachment.getIn ['data', 'thumbnailUrl']
    imageHeight = @props.attachment.getIn ['data', 'imageHeight']
    imageWidth = @props.attachment.getIn ['data', 'imageWidth']

    insideX = imageWidth <= @props.widthBoundary
    insideY = imageHeight <= @props.heightBoundary

    if insideX and insideY
      previewWidth = imageWidth
      previewHeight = imageHeight
    else
      boundaryRatio = @props.widthBoundary / @props.heightBoundary
      realRatio = imageWidth / imageHeight

      if boundaryRatio > realRatio # boundary is wider, use height as base
        previewHeight = @props.heightBoundary
        previewWidth = Math.round(@props.heightBoundary / imageHeight * imageWidth)
      else
        previewWidth = @props.widthBoundary
```

Response:
module.exports = React.createClass({
  displayName: 'message-rich-image',
  mixins: [PureRenderMixin],
  propTypes: {
    // attachment = {
    //   data:
    //     thumbnailUrl: string
    //     imageHeight: number
    //     imageWidth: number
    //   isUploading: boolean
    //   progress: boolean
    // }
    attachment: T.instanceOf(Immutable.Map).isRequired,
    widthBoundary: T.number,
    heightBoundary: T.number,
    onClick: T.func,
    onLoaded: T.func
  },
  getDefaultProps: function() {
    return {
      widthBoundary: 360,
      heightBoundary: 360
    };
  },
  onClick: function() {
    var base;
    return typeof (base = this.props).onClick === "function" ? base.onClick() : void 0;
  },
  onLoaded: function() {
    var base;
    return typeof (base = this.props).onLoaded === "function" ? base.onLoaded() : void 0;
  },
  renderPreview: function() {
    var boundaryRatio, imageHeight, imageWidth, insideX, insideY, previewHeight, previewWidth, realRatio, thumbnailUrl;
    thumbnailUrl = this.props.attachment.getIn(['data', 'thumbnailUrl']);
    imageHeight = this.props.attachment.getIn(['data', 'imageHeight']);
    imageWidth = this.props.attachment.getIn(['data', 'imageWidth']);
    insideX = imageWidth <= this.props.widthBoundary;
    insideY = imageHeight <= this.props.heightBoundary;
    if (insideX && insideY) {
      previewWidth = imageWidth;
      return previewHeight = imageHeight;
    } else {
      boundaryRatio = this.props.widthBoundary / this.props.heightBoundary;
      realRatio = imageWidth / imageHeight;
      if (boundaryRatio > realRatio) { // boundary is wider, use height as base
        previewHeight = this.props.heightBoundary;
        return previewWidth = Math.round(this.props.heightBoundary / imageHeight * imageWidth);
      } else {
        return previewWidth = this.props.widthBoundary;
      }
    }
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
  displayName: 'message-rich-image',
  mixins: [PureRenderMixin],
  propTypes: {
    // attachment = {
    //   data:
    //     thumbnailUrl: string
    //     imageHeight: number
    //     imageWidth: number
    //   isUploading: boolean
    //   progress: boolean
    // }
    attachment: T.instanceOf(Immutable.Map).isRequired,
    widthBoundary: T.number,
    heightBoundary: T.number,
    onClick: T.func,
    onLoaded: T.func
  },
  getDefaultProps: function() {
    return {
      widthBoundary: 360,
      heightBoundary: 360
    };
  },
  onClick: function() {
    var base;
    return typeof (base = this.props).onClick === "function" ? base.onClick() : void 0;
  },
  onLoaded: function() {
    var base;
    return typeof (base = this.props).onLoaded === "function" ? base.onLoaded() : void 0;
  },
  renderPreview: function() {
    var boundaryRatio, imageHeight, imageWidth, insideX, insideY, previewHeight, previewWidth, realRatio, thumbnailUrl;
    thumbnailUrl = this.props.attachment.getIn(['data', 'thumbnailUrl']);
    imageHeight = this.props.attachment.getIn(['data', 'imageHeight']);
    imageWidth = this.props.attachment.getIn(['data', 'imageWidth']);
    insideX = imageWidth <= this.props.widthBoundary;
    insideY = imageHeight <= this.props.heightBoundary;
    if (insideX && insideY) {
      previewWidth = imageWidth;
      return previewHeight = imageHeight;
    } else {
      boundaryRatio = this.props.widthBoundary / this.props.heightBoundary;
      realRatio = imageWidth / imageHeight;
      if (boundaryRatio > realRatio) { // boundary is wider, use height as base
        previewHeight = this.props.heightBoundary;
        return previewWidth = Math.round(this.props.heightBoundary / imageHeight * imageWidth);
      } else {
        return previewWidth = this.props.widthBoundary;
      }
    }
  }
});
```

Response:
module.exports = React.createClass
  displayName: 'message-rich-image'

  mixins: [ PureRenderMixin ]

  propTypes:
    # attachment = {
    #   data:
    #     thumbnailUrl: string
    #     imageHeight: number
    #     imageWidth: number
    #   isUploading: boolean
    #   progress: boolean
    # }
    attachment: T.instanceOf(Immutable.Map).isRequired
    widthBoundary: T.number
    heightBoundary: T.number
    onClick: T.func
    onLoaded: T.func

  getDefaultProps: ->
    widthBoundary: 360
    heightBoundary: 360

  onClick: ->
    @props.onClick?()

  onLoaded: ->
    @props.onLoaded?()

  renderPreview: ->
    thumbnailUrl = @props.attachment.getIn ['data', 'thumbnailUrl']
    imageHeight = @props.attachment.getIn ['data', 'imageHeight']
    imageWidth = @props.attachment.getIn ['data', 'imageWidth']

    insideX = imageWidth <= @props.widthBoundary
    insideY = imageHeight <= @props.heightBoundary

    if insideX and insideY
      previewWidth = imageWidth
      previewHeight = imageHeight
    else
      boundaryRatio = @props.widthBoundary / @props.heightBoundary
      realRatio = imageWidth / imageHeight

      if boundaryRatio > realRatio # boundary is wider, use height as base
        previewHeight = @props.heightBoundary
        previewWidth = Math.round(@props.heightBoundary / imageHeight * imageWidth)
      else
        previewWidth = @props.widthBoundary


Prompt:
module.exports = React.createClass
  displayName: 'message-rich-image'

  mixins: [ PureRenderMixin ]

  propTypes:
    # attachment = {
    #   data:
    #     thumbnailUrl: string
    #     imageHeight: number
    #     imageWidth: number
    #   isUploading: boolean
    #   progress: boolean
    # }
    attachment: T.instanceOf(Immutable.Map).isRequired
    widthBoundary: T.number
    heightBoundary: T.number
    onClick: T.func
    onLoaded: T.func

  getDefaultProps: ->
    widthBoundary: 360
    heightBoundary: 360

  onClick: ->

Response:
@props.onClick?()

  onLoaded: ->
    @props.onLoaded?()

  renderPreview: ->
    thumbnailUrl = @props.attachment.getIn ['data', 'thumbnailUrl']
    imageHeight = @props.attachment.getIn ['data', 'imageHeight']
    imageWidth = @props.attachment.getIn ['data', 'imageWidth']

    insideX = imageWidth <= @props.widthBoundary
    insideY = imageHeight <= @props.heightBoundary

    if insideX and insideY
      previewWidth = imageWidth
      previewHeight = imageHeight
    else
      boundaryRatio = @props.widthBoundary / @props.heightBoundary
      realRatio = imageWidth / imageHeight

      if boundaryRatio > realRatio # boundary is wider, use height as base
        previewHeight = @props.heightBoundary
        previewWidth = Math.round(@props.heightBoundary / imageHeight * imageWidth)
      else
        previewWidth = @props.widthBoundary


Response:
previewHeight = Math.round(@props.widthBoundary / imageWidth * imageHeight)

    src = # don't parse preview image if thumbnailUrl is a data uri generated from canvas.todataurl
      if thumbnailUrl.substring(0, 4) is 'data'
        thumbnailUrl
      else
        thumbnailUrl
          .replace(/(\/h\/\d+)/g, "/h/#{previewHeight}")
          .replace(/(\/w\/\d+)/g, "/w/#{previewWidth}")

    style =
      height: previewHeight
      maxWidth: previewWidth

    image = LightImage
      src: src
      onClick: @onClick
      onLoaded: @onLoaded
      width: previewWidth
      height: previewHeight

    div className: 'preview', style: style,
      image

  render: ->
    div className: 'attachment-image',
      @renderPreview()


Prompt:
previewHeight = Math.round(@props.widthBoundary / imageWidth * imageHeight)

    src = # don't parse preview image if thumbnailUrl is a data uri generated from canvas.todataurl
      if thumbnailUrl.substring(0, 4) is 'data'
        thumbnailUrl
      else
        thumbnailUrl
          .replace(/(\/h\/\d+)/g, "/h/#{previewHeight}")
          .replace(/(\/w\/\d+)/g, "/w/#{previewWidth}")

    style =
      height: previewHeight
      maxWidth: previewWidth

Response:
image = LightImage
      src: src
      onClick: @onClick
      onLoaded: @onLoaded
      width: previewWidth
      height: previewHeight

    div className: 'preview', style: style,
      image

  render: ->
    div className: 'attachment-image',
      @renderPreview()


Response:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

Swag.registerHelpers Handlebars

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

Swag.registerHelpers Handlebars

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '<ul class="list"><li>one</li></ul>'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '<ol class="list"><li>boom</li></ol>'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return <br> tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '<br><br><br><br>'
```

Response:
var Handlebars, Swag;

require('should');

Handlebars = require('handlebars');

Swag = require('../lib/swag');

Swag.registerHelpers(Handlebars);

describe('ul', function() {
  return describe('{{#ul list class="list"}} \n {{this}} \n {{/ul}}', function() {
    return it('should create an unordered list.', function() {
      var context, source, template;
      source = '{{#ul list class="list"}}{{this}}{{/ul}}';
      template = Handlebars.compile(source);
      context = {
        list: ['one']
      };
      return template(context).should.equal('

one

');
    });
  });
});

describe('ol', function() {
  return describe('{{#ol list class="list"}} \n {{this}} \n {{/ol}}', function() {
    return it('should create an ordered list.', function() {
      var context, source, template;
      source = '{{#ol list class="list"}}{{this}}{{/ol}}';
      template = Handlebars.compile(source);
      context = {
        list: ['boom']
      };
      return template(context).should.equal('

boom

');
    });
  });
});

describe('br', function() {
  return describe('{{br 4}}', function() {
    return it('should return
 tags based on a count.', function() {
      var source, template;
      source = '{{br 4}}';
      template = Handlebars.compile(source);
      return template(context).should.equal('

');
    });
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Handlebars, Swag;

require('should');

Handlebars = require('handlebars');

Swag = require('../lib/swag');

Swag.registerHelpers(Handlebars);

describe('ul', function() {
  return describe('{{#ul list class="list"}} \n {{this}} \n {{/ul}}', function() {
    return it('should create an unordered list.', function() {
      var context, source, template;
      source = '{{#ul list class="list"}}{{this}}{{/ul}}';
      template = Handlebars.compile(source);
      context = {
        list: ['one']
      };
      return template(context).should.equal('<ul class="list"><li>one</li></ul>');
    });
  });
});

describe('ol', function() {
  return describe('{{#ol list class="list"}} \n {{this}} \n {{/ol}}', function() {
    return it('should create an ordered list.', function() {
      var context, source, template;
      source = '{{#ol list class="list"}}{{this}}{{/ol}}';
      template = Handlebars.compile(source);
      context = {
        list: ['boom']
      };
      return template(context).should.equal('<ol class="list"><li>boom</li></ol>');
    });
  });
});

describe('br', function() {
  return describe('{{br 4}}', function() {
    return it('should return <br> tags based on a count.', function() {
      var source, template;
      source = '{{br 4}}';
      template = Handlebars.compile(source);
      return template(context).should.equal('<br><br><br><br>');
    });
  });
});
```

Response:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

Swag.registerHelpers Handlebars

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Prompt:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

Swag.registerHelpers Handlebars

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

Response:
describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Response:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '<ul class="list"><li>one</li></ul>'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '<ol class="list"><li>boom</li></ol>'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return <br> tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '<br><br><br><br>'
```

Response:
var Handlebars, Swag;

require('should');

Handlebars = require('handlebars');

Swag = require('../lib/swag');

describe('ul', function() {
  return describe('{{#ul list class="list"}} \n {{this}} \n {{/ul}}', function() {
    return it('should create an unordered list.', function() {
      var context, source, template;
      source = '{{#ul list class="list"}}{{this}}{{/ul}}';
      template = Handlebars.compile(source);
      context = {
        list: ['one']
      };
      return template(context).should.equal('

one

');
    });
  });
});

describe('ol', function() {
  return describe('{{#ol list class="list"}} \n {{this}} \n {{/ol}}', function() {
    return it('should create an ordered list.', function() {
      var context, source, template;
      source = '{{#ol list class="list"}}{{this}}{{/ol}}';
      template = Handlebars.compile(source);
      context = {
        list: ['boom']
      };
      return template(context).should.equal('

boom

');
    });
  });
});

describe('br', function() {
  return describe('{{br 4}}', function() {
    return it('should return
 tags based on a count.', function() {
      var source, template;
      source = '{{br 4}}';
      template = Handlebars.compile(source);
      return template(context).should.equal('

');
    });
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Handlebars, Swag;

require('should');

Handlebars = require('handlebars');

Swag = require('../lib/swag');

describe('ul', function() {
  return describe('{{#ul list class="list"}} \n {{this}} \n {{/ul}}', function() {
    return it('should create an unordered list.', function() {
      var context, source, template;
      source = '{{#ul list class="list"}}{{this}}{{/ul}}';
      template = Handlebars.compile(source);
      context = {
        list: ['one']
      };
      return template(context).should.equal('<ul class="list"><li>one</li></ul>');
    });
  });
});

describe('ol', function() {
  return describe('{{#ol list class="list"}} \n {{this}} \n {{/ol}}', function() {
    return it('should create an ordered list.', function() {
      var context, source, template;
      source = '{{#ol list class="list"}}{{this}}{{/ol}}';
      template = Handlebars.compile(source);
      context = {
        list: ['boom']
      };
      return template(context).should.equal('<ol class="list"><li>boom</li></ol>');
    });
  });
});

describe('br', function() {
  return describe('{{br 4}}', function() {
    return it('should return <br> tags based on a count.', function() {
      var source, template;
      source = '{{br 4}}';
      template = Handlebars.compile(source);
      return template(context).should.equal('<br><br><br><br>');
    });
  });
});
```

Response:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

describe 'ol', ->
    describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Prompt:
require 'should'

Handlebars = require 'handlebars'
Swag = require '../lib/swag'

describe 'ul', ->
    describe '{{#ul list class="list"}} \n
        {{this}} \n
    {{/ul}}', ->
        it 'should create an unordered list.', ->
            source   = '{{#ul list class="list"}}{{this}}{{/ul}}'
            template = Handlebars.compile(source)
            context  = list: ['one']

            template(context).should.equal '

one

'

describe 'ol', ->

Response:
describe '{{#ol list class="list"}} \n
        {{this}} \n
    {{/ol}}', ->
        it 'should create an ordered list.', ->
            source   = '{{#ol list class="list"}}{{this}}{{/ol}}'
            template = Handlebars.compile(source)
            context  = list: ['boom']

            template(context).should.equal '

boom

'

describe 'br', ->
    describe '{{br 4}}', ->
        it 'should return
 tags based on a count.', ->
            source   = '{{br 4}}'
            template = Handlebars.compile(source)

            template(context).should.equal '

'


Response:
module.exports = React.createClass
  displayName: 'channel-info'
  mixins: [ mixinChannelInfo ]

  propTypes:
    _teamId: T.string.isRequired
    _channelType: T.string.isRequired
    channel: T.instanceOf(Immutable.Map).isRequired

  getInitialState: ->
    showMemberCard: false
    showStoryViewer: false

  componentDidMount: ->
    @_headerEl = @refs.header

  getBaseArea: ->
    @_headerEl?.getBoundingClientRect() or {}

  positionAlgorithm: (area) ->
    top: area.top + 56
    left: area.left

  togglePopover: ->
    @setState showMemberCard: not @state.showMemberCard

  onTitleClick: (event) ->
    if @props._channelType is 'chat'
      event.stopPropagation()
      @togglePopover()

  onStoryViewerClose: ->
    @setState showStoryViewer: false

  onPreviewClick: ->
    @setState showStoryViewer: true

  onOpenLink: (event) ->
    event.preventDefault()

    href = @props.channel.getIn [ 'data', 'url' ]
    window.open urlParse href, true

  renderPreview: ->
    return noscript() unless @props._channelType is 'story'
    return noscript() unless detect.isImageWithPreview(@props.channel.get('data'))

    url = constraint.thumbnail @props.channel.getIn([ 'data', 'thumbnailUrl' ]), 40, 56

    span


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
  displayName: 'channel-info'
  mixins: [ mixinChannelInfo ]

  propTypes:
    _teamId: T.string.isRequired
    _channelType: T.string.isRequired
    channel: T.instanceOf(Immutable.Map).isRequired

  getInitialState: ->
    showMemberCard: false
    showStoryViewer: false

  componentDidMount: ->
    @_headerEl = @refs.header

  getBaseArea: ->
    @_headerEl?.getBoundingClientRect() or {}

  positionAlgorithm: (area) ->
    top: area.top + 56
    left: area.left

  togglePopover: ->
    @setState showMemberCard: not @state.showMemberCard

  onTitleClick: (event) ->
    if @props._channelType is 'chat'
      event.stopPropagation()
      @togglePopover()

  onStoryViewerClose: ->
    @setState showStoryViewer: false

  onPreviewClick: ->
    @setState showStoryViewer: true

  onOpenLink: (event) ->
    event.preventDefault()

    href = @props.channel.getIn [ 'data', 'url' ]
    window.open urlParse href, true

  renderPreview: ->
    return noscript() unless @props._channelType is 'story'
    return noscript() unless detect.isImageWithPreview(@props.channel.get('data'))

    url = constraint.thumbnail @props.channel.getIn([ 'data', 'thumbnailUrl' ]), 40, 56

    span
```

Response:
module.exports = React.createClass({
  displayName: 'channel-info',
  mixins: [mixinChannelInfo],
  propTypes: {
    _teamId: T.string.isRequired,
    _channelType: T.string.isRequired,
    channel: T.instanceOf(Immutable.Map).isRequired
  },
  getInitialState: function() {
    return {
      showMemberCard: false,
      showStoryViewer: false
    };
  },
  componentDidMount: function() {
    return this._headerEl = this.refs.header;
  },
  getBaseArea: function() {
    var ref;
    return ((ref = this._headerEl) != null ? ref.getBoundingClientRect() : void 0) || {};
  },
  positionAlgorithm: function(area) {
    return {
      top: area.top + 56,
      left: area.left
    };
  },
  togglePopover: function() {
    return this.setState({
      showMemberCard: !this.state.showMemberCard
    });
  },
  onTitleClick: function(event) {
    if (this.props._channelType === 'chat') {
      event.stopPropagation();
      return this.togglePopover();
    }
  },
  onStoryViewerClose: function() {
    return this.setState({
      showStoryViewer: false
    });
  },
  onPreviewClick: function() {
    return this.setState({
      showStoryViewer: true
    });
  },
  onOpenLink: function(event) {
    var href;
    event.preventDefault();
    href = this.props.channel.getIn(['data', 'url']);
    return window.open(urlParse(href, true));
  },
  renderPreview: function() {
    var url;
    if (this.props._channelType !== 'story') {
      return noscript();
    }
    if (!detect.isImageWithPreview(this.props.channel.get('data'))) {
      return noscript();
    }
    url = constraint.thumbnail(this.props.channel.getIn(['data', 'thumbnailUrl']), 40, 56);
    return span;
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
  displayName: 'channel-info',
  mixins: [mixinChannelInfo],
  propTypes: {
    _teamId: T.string.isRequired,
    _channelType: T.string.isRequired,
    channel: T.instanceOf(Immutable.Map).isRequired
  },
  getInitialState: function() {
    return {
      showMemberCard: false,
      showStoryViewer: false
    };
  },
  componentDidMount: function() {
    return this._headerEl = this.refs.header;
  },
  getBaseArea: function() {
    var ref;
    return ((ref = this._headerEl) != null ? ref.getBoundingClientRect() : void 0) || {};
  },
  positionAlgorithm: function(area) {
    return {
      top: area.top + 56,
      left: area.left
    };
  },
  togglePopover: function() {
    return this.setState({
      showMemberCard: !this.state.showMemberCard
    });
  },
  onTitleClick: function(event) {
    if (this.props._channelType === 'chat') {
      event.stopPropagation();
      return this.togglePopover();
    }
  },
  onStoryViewerClose: function() {
    return this.setState({
      showStoryViewer: false
    });
  },
  onPreviewClick: function() {
    return this.setState({
      showStoryViewer: true
    });
  },
  onOpenLink: function(event) {
    var href;
    event.preventDefault();
    href = this.props.channel.getIn(['data', 'url']);
    return window.open(urlParse(href, true));
  },
  renderPreview: function() {
    var url;
    if (this.props._channelType !== 'story') {
      return noscript();
    }
    if (!detect.isImageWithPreview(this.props.channel.get('data'))) {
      return noscript();
    }
    url = constraint.thumbnail(this.props.channel.getIn(['data', 'thumbnailUrl']), 40, 56);
    return span;
  }
});
```

Response:
module.exports = React.createClass
  displayName: 'channel-info'
  mixins: [ mixinChannelInfo ]

  propTypes:
    _teamId: T.string.isRequired
    _channelType: T.string.isRequired
    channel: T.instanceOf(Immutable.Map).isRequired

  getInitialState: ->
    showMemberCard: false
    showStoryViewer: false

  componentDidMount: ->
    @_headerEl = @refs.header

  getBaseArea: ->
    @_headerEl?.getBoundingClientRect() or {}

  positionAlgorithm: (area) ->
    top: area.top + 56
    left: area.left

  togglePopover: ->
    @setState showMemberCard: not @state.showMemberCard

  onTitleClick: (event) ->
    if @props._channelType is 'chat'
      event.stopPropagation()
      @togglePopover()

  onStoryViewerClose: ->
    @setState showStoryViewer: false

  onPreviewClick: ->
    @setState showStoryViewer: true

  onOpenLink: (event) ->
    event.preventDefault()

    href = @props.channel.getIn [ 'data', 'url' ]
    window.open urlParse href, true

  renderPreview: ->
    return noscript() unless @props._channelType is 'story'
    return noscript() unless detect.isImageWithPreview(@props.channel.get('data'))

    url = constraint.thumbnail @props.channel.getIn([ 'data', 'thumbnailUrl' ]), 40, 56

    span


Prompt:
module.exports = React.createClass
  displayName: 'channel-info'
  mixins: [ mixinChannelInfo ]

  propTypes:
    _teamId: T.string.isRequired
    _channelType: T.string.isRequired
    channel: T.instanceOf(Immutable.Map).isRequired

  getInitialState: ->
    showMemberCard: false
    showStoryViewer: false

  componentDidMount: ->
    @_headerEl = @refs.header

  getBaseArea: ->
    @_headerEl?.getBoundingClientRect() or {}

  positionAlgorithm: (area) ->
    top: area.top + 56
    left: area.left

  togglePopover: ->
    @setState showMemberCard: not @state.showMemberCard

Response:
onTitleClick: (event) ->
    if @props._channelType is 'chat'
      event.stopPropagation()
      @togglePopover()

  onStoryViewerClose: ->
    @setState showStoryViewer: false

  onPreviewClick: ->
    @setState showStoryViewer: true

  onOpenLink: (event) ->
    event.preventDefault()

    href = @props.channel.getIn [ 'data', 'url' ]
    window.open urlParse href, true

  renderPreview: ->
    return noscript() unless @props._channelType is 'story'
    return noscript() unless detect.isImageWithPreview(@props.channel.get('data'))

    url = constraint.thumbnail @props.channel.getIn([ 'data', 'thumbnailUrl' ]), 40, 56

    span


Response:
className: 'preview flex-static'
      style: backgroundImage: "url(#{ url })"
      onClick: @onPreviewClick

  renderTitle: ->
    cxSpan = cx 'title', 'text-overflow', 'flex-static', 'is-clickable': @props._channelType is 'chat'
    span className: cxSpan, onClick: @onTitleClick, @extractTitle()

  renderArchivedInfo: ->
    return null if not @props.channel.get('isArchived')
    cxSpan = cx 'archived', 'flex-static', 'muted'
    span className: cxSpan, "(#{lang.getText('archived-topic')})"

  renderUrl: ->
    return noscript() if @props.channel.get('category') isnt 'link'
    a className: 'url text-overflow', onClick: @onOpenLink, @props.channel.getIn [ 'data', 'url' ]

  renderMemberCard: ->
    LightPopover
      baseArea: if @state.showMemberCard then @getBaseArea() else {}
      onPopoverClose: @togglePopover
      positionAlgorithm: @positionAlgorithm
      showClose: false
      show: @state.showMemberCard
      name: 'member-card'
      MemberCard
        _teamId: @props._teamId
        member: @props.channel
        showEntrance: false

  renderStoryViewer: ->
    LightModal
      name: 'story-viewer'
      show: @state.showStoryViewer
      onCloseClick: @onStoryViewerClose
      StoryViewer
        story: @props.channel
        onClose: @onStoryViewerClose

  render: ->
    div className: 'channel-info flex-horiz flex-vcenter', ref: 'header',
      @renderPreview()
      @renderTitle()
      @renderArchivedInfo()
      @renderUrl()
      @renderMemberCard()
      @renderStoryViewer()


Prompt:
className: 'preview flex-static'
      style: backgroundImage: "url(#{ url })"
      onClick: @onPreviewClick

  renderTitle: ->
    cxSpan = cx 'title', 'text-overflow', 'flex-static', 'is-clickable': @props._channelType is 'chat'
    span className: cxSpan, onClick: @onTitleClick, @extractTitle()

  renderArchivedInfo: ->
    return null if not @props.channel.get('isArchived')
    cxSpan = cx 'archived', 'flex-static', 'muted'
    span className: cxSpan, "(#{lang.getText('archived-topic')})"

  renderUrl: ->
    return noscript() if @props.channel.get('category') isnt 'link'
    a className: 'url text-overflow', onClick: @onOpenLink, @props.channel.getIn [ 'data', 'url' ]

  renderMemberCard: ->
    LightPopover
      baseArea: if @state.showMemberCard then @getBaseArea() else {}
      onPopoverClose: @togglePopover
      positionAlgorithm: @positionAlgorithm
      showClose: false

Response:
show: @state.showMemberCard
      name: 'member-card'
      MemberCard
        _teamId: @props._teamId
        member: @props.channel
        showEntrance: false

  renderStoryViewer: ->
    LightModal
      name: 'story-viewer'
      show: @state.showStoryViewer
      onCloseClick: @onStoryViewerClose
      StoryViewer
        story: @props.channel
        onClose: @onStoryViewerClose

  render: ->
    div className: 'channel-info flex-horiz flex-vcenter', ref: 'header',
      @renderPreview()
      @renderTitle()
      @renderArchivedInfo()
      @renderUrl()
      @renderMemberCard()
      @renderStoryViewer()


Response:
chai      = require 'chai'
csv       = require '../../src/formatters/csv'
should    = chai.should()

describe "The CSV formatter", ->

  it "should be a function", ->
    csv.should.be.a 'function'

  it "should return a string", ->
    csv({}).should.be.a 'string'

  it "should create a csv", ->
    stats =
      total   : 1
      source  : 2
      comment : 3
      single  : 4
      block   : 5
      mixed   : 6
      empty   : 7
    csv(summary: stats).should.equal """
      Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty
      Total,1,2,3,4,5,6,7
      """


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
chai      = require 'chai'
csv       = require '../../src/formatters/csv'
should    = chai.should()

describe "The CSV formatter", ->

  it "should be a function", ->
    csv.should.be.a 'function'

  it "should return a string", ->
    csv({}).should.be.a 'string'

  it "should create a csv", ->
    stats =
      total   : 1
      source  : 2
      comment : 3
      single  : 4
      block   : 5
      mixed   : 6
      empty   : 7
    csv(summary: stats).should.equal """
      Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty
      Total,1,2,3,4,5,6,7
      """
```

Response:
var chai, csv, should;

chai = require('chai');

csv = require('../../src/formatters/csv');

should = chai.should();

describe("The CSV formatter", function() {
  it("should be a function", function() {
    return csv.should.be.a('function');
  });
  it("should return a string", function() {
    return csv({}).should.be.a('string');
  });
  return it("should create a csv", function() {
    var stats;
    stats = {
      total: 1,
      source: 2,
      comment: 3,
      single: 4,
      block: 5,
      mixed: 6,
      empty: 7
    };
    return csv({
      summary: stats
    }).should.equal(`Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty
Total,1,2,3,4,5,6,7`);
  });
});