Response:
Settings =
    get: (variable) ->
        localStorage['settings_' + variable]
    set: (variable, newValue) ->
        localStorage.setItem 'settings_' + variable, newValue

    init: ->
        @set('updateUrl', 'http://getatraci.net/update.json') if not @get('updateUrl')

Settings.init()


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Settings =
    get: (variable) ->
        localStorage['settings_' + variable]
    set: (variable, newValue) ->
        localStorage.setItem 'settings_' + variable, newValue

    init: ->
        @set('updateUrl', 'http://getatraci.net/update.json') if not @get('updateUrl')

Settings.init()
```

Response:
var Settings;

Settings = {
  get: function(variable) {
    return localStorage['settings_' + variable];
  },
  set: function(variable, newValue) {
    return localStorage.setItem('settings_' + variable, newValue);
  },
  init: function() {
    if (!this.get('updateUrl')) {
      return this.set('updateUrl', 'http://getatraci.net/update.json');
    }
  }
};

Settings.init();


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

Settings = {
  get: function(variable) {
    return localStorage['settings_' + variable];
  },
  set: function(variable, newValue) {
    return localStorage.setItem('settings_' + variable, newValue);
  },
  init: function() {
    if (!this.get('updateUrl')) {
      return this.set('updateUrl', 'http://getatraci.net/update.json');
    }
  }
};

Settings.init();
```

Response:
Settings =
    get: (variable) ->
        localStorage['settings_' + variable]
    set: (variable, newValue) ->
        localStorage.setItem 'settings_' + variable, newValue

    init: ->
        @set('updateUrl', 'http://getatraci.net/update.json') if not @get('updateUrl')

Settings.init()


Prompt:
Settings =
    get: (variable) ->
        localStorage['settings_' + variable]
    set: (variable, newValue) ->
        localStorage.setItem 'settings_' + variable, newValue

Response:
init: ->
        @set('updateUrl', 'http://getatraci.net/update.json') if not @get('updateUrl')

Settings.init()


Response:
Order = require('../../lib/datastore/order')

describe 'Order', ->
  beforeEach ->
    @account = {}
    @order = new Order({}, 'USD', 1, 'BTC', 10)

  it 'should be clonable', ->
    @order.clone.should.exist
    order2 = @order.clone()

    order2.account.should.equal(@order.account)
    @order.account = null
    order2.account.should.not.equal(@order.account)

    order2.offered_currency.should.equal(@order.offered_currency)
    @order.offered_currency = null
    order2.offered_currency.should.not.equal(@order.offered_currency)

    order2.offered_amount.should.equal(@order.offered_amount)
    @order.offered_amount = null
    order2.offered_amount.should.not.equal(@order.offered_amount)

    order2.received_currency.should.equal(@order.received_currency)
    @order.received_currency = null
    order2.received_currency.should.not.equal(@order.received_currency)

    order2.received_amount.should.equal(@order.received_amount)
    @order.received_amount = null
    order2.received_amount.should.not.equal(@order.received_amount)

  it 'should be able to produce a mirrored copy', ->
    order2 = @order.clone(true)
    order2.account.should.equal(@order.account)
    order2.offered_currency.should.equal(@order.received_currency)
    order2.offered_amount.should.equal(@order.received_amount)
    order2.received_currency.should.equal(@order.offered_currency)
    order2.received_amount.should.equal(@order.offered_amount)


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Order = require('../../lib/datastore/order')

describe 'Order', ->
  beforeEach ->
    @account = {}
    @order = new Order({}, 'USD', 1, 'BTC', 10)

  it 'should be clonable', ->
    @order.clone.should.exist
    order2 = @order.clone()

    order2.account.should.equal(@order.account)
    @order.account = null
    order2.account.should.not.equal(@order.account)

    order2.offered_currency.should.equal(@order.offered_currency)
    @order.offered_currency = null
    order2.offered_currency.should.not.equal(@order.offered_currency)

    order2.offered_amount.should.equal(@order.offered_amount)
    @order.offered_amount = null
    order2.offered_amount.should.not.equal(@order.offered_amount)

    order2.received_currency.should.equal(@order.received_currency)
    @order.received_currency = null
    order2.received_currency.should.not.equal(@order.received_currency)

    order2.received_amount.should.equal(@order.received_amount)
    @order.received_amount = null
    order2.received_amount.should.not.equal(@order.received_amount)

  it 'should be able to produce a mirrored copy', ->
    order2 = @order.clone(true)
    order2.account.should.equal(@order.account)
    order2.offered_currency.should.equal(@order.received_currency)
    order2.offered_amount.should.equal(@order.received_amount)
    order2.received_currency.should.equal(@order.offered_currency)
    order2.received_amount.should.equal(@order.offered_amount)
```

Response:
var Order;

Order = require('../../lib/datastore/order');

describe('Order', function() {
  beforeEach(function() {
    this.account = {};
    return this.order = new Order({}, 'USD', 1, 'BTC', 10);
  });
  it('should be clonable', function() {
    var order2;
    this.order.clone.should.exist;
    order2 = this.order.clone();
    order2.account.should.equal(this.order.account);
    this.order.account = null;
    order2.account.should.not.equal(this.order.account);
    order2.offered_currency.should.equal(this.order.offered_currency);
    this.order.offered_currency = null;
    order2.offered_currency.should.not.equal(this.order.offered_currency);
    order2.offered_amount.should.equal(this.order.offered_amount);
    this.order.offered_amount = null;
    order2.offered_amount.should.not.equal(this.order.offered_amount);
    order2.received_currency.should.equal(this.order.received_currency);
    this.order.received_currency = null;
    order2.received_currency.should.not.equal(this.order.received_currency);
    order2.received_amount.should.equal(this.order.received_amount);
    this.order.received_amount = null;
    return order2.received_amount.should.not.equal(this.order.received_amount);
  });
  return it('should be able to produce a mirrored copy', function() {
    var order2;
    order2 = this.order.clone(true);
    order2.account.should.equal(this.order.account);
    order2.offered_currency.should.equal(this.order.received_currency);
    order2.offered_amount.should.equal(this.order.received_amount);
    order2.received_currency.should.equal(this.order.offered_currency);
    return order2.received_amount.should.equal(this.order.offered_amount);
  });
});


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

Order = require('../../lib/datastore/order');

describe('Order', function() {
  beforeEach(function() {
    this.account = {};
    return this.order = new Order({}, 'USD', 1, 'BTC', 10);
  });
  it('should be clonable', function() {
    var order2;
    this.order.clone.should.exist;
    order2 = this.order.clone();
    order2.account.should.equal(this.order.account);
    this.order.account = null;
    order2.account.should.not.equal(this.order.account);
    order2.offered_currency.should.equal(this.order.offered_currency);
    this.order.offered_currency = null;
    order2.offered_currency.should.not.equal(this.order.offered_currency);
    order2.offered_amount.should.equal(this.order.offered_amount);
    this.order.offered_amount = null;
    order2.offered_amount.should.not.equal(this.order.offered_amount);
    order2.received_currency.should.equal(this.order.received_currency);
    this.order.received_currency = null;
    order2.received_currency.should.not.equal(this.order.received_currency);
    order2.received_amount.should.equal(this.order.received_amount);
    this.order.received_amount = null;
    return order2.received_amount.should.not.equal(this.order.received_amount);
  });
  return it('should be able to produce a mirrored copy', function() {
    var order2;
    order2 = this.order.clone(true);
    order2.account.should.equal(this.order.account);
    order2.offered_currency.should.equal(this.order.received_currency);
    order2.offered_amount.should.equal(this.order.received_amount);
    order2.received_currency.should.equal(this.order.offered_currency);
    return order2.received_amount.should.equal(this.order.offered_amount);
  });
});
```

Response:
Order = require('../../lib/datastore/order')

describe 'Order', ->
  beforeEach ->
    @account = {}
    @order = new Order({}, 'USD', 1, 'BTC', 10)

  it 'should be clonable', ->
    @order.clone.should.exist
    order2 = @order.clone()

    order2.account.should.equal(@order.account)
    @order.account = null
    order2.account.should.not.equal(@order.account)

    order2.offered_currency.should.equal(@order.offered_currency)
    @order.offered_currency = null
    order2.offered_currency.should.not.equal(@order.offered_currency)

    order2.offered_amount.should.equal(@order.offered_amount)
    @order.offered_amount = null
    order2.offered_amount.should.not.equal(@order.offered_amount)

    order2.received_currency.should.equal(@order.received_currency)
    @order.received_currency = null
    order2.received_currency.should.not.equal(@order.received_currency)

    order2.received_amount.should.equal(@order.received_amount)
    @order.received_amount = null
    order2.received_amount.should.not.equal(@order.received_amount)

  it 'should be able to produce a mirrored copy', ->
    order2 = @order.clone(true)
    order2.account.should.equal(@order.account)
    order2.offered_currency.should.equal(@order.received_currency)
    order2.offered_amount.should.equal(@order.received_amount)
    order2.received_currency.should.equal(@order.offered_currency)
    order2.received_amount.should.equal(@order.offered_amount)


Prompt:
Order = require('../../lib/datastore/order')

describe 'Order', ->
  beforeEach ->
    @account = {}
    @order = new Order({}, 'USD', 1, 'BTC', 10)

  it 'should be clonable', ->
    @order.clone.should.exist
    order2 = @order.clone()

    order2.account.should.equal(@order.account)
    @order.account = null
    order2.account.should.not.equal(@order.account)

    order2.offered_currency.should.equal(@order.offered_currency)
    @order.offered_currency = null
    order2.offered_currency.should.not.equal(@order.offered_currency)

Response:
order2.offered_amount.should.equal(@order.offered_amount)
    @order.offered_amount = null
    order2.offered_amount.should.not.equal(@order.offered_amount)

    order2.received_currency.should.equal(@order.received_currency)
    @order.received_currency = null
    order2.received_currency.should.not.equal(@order.received_currency)

    order2.received_amount.should.equal(@order.received_amount)
    @order.received_amount = null
    order2.received_amount.should.not.equal(@order.received_amount)

  it 'should be able to produce a mirrored copy', ->
    order2 = @order.clone(true)
    order2.account.should.equal(@order.account)
    order2.offered_currency.should.equal(@order.received_currency)
    order2.offered_amount.should.equal(@order.received_amount)
    order2.received_currency.should.equal(@order.offered_currency)
    order2.received_amount.should.equal(@order.offered_amount)


Response:
messages = db.messages.find({hasTag: null}, {tags: 1})

num = 0

messages.forEach (message) ->
  num += 1
  print "Scan num", num unless num % 10000
  hasTag = if message.tags?.length then true else false
  db.messages.update({_id: message._id}, {$set: {hasTag: hasTag}})

print "Finish num", num


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
messages = db.messages.find({hasTag: null}, {tags: 1})

num = 0

messages.forEach (message) ->
  num += 1
  print "Scan num", num unless num % 10000
  hasTag = if message.tags?.length then true else false
  db.messages.update({_id: message._id}, {$set: {hasTag: hasTag}})

print "Finish num", num
```

Response:
var messages, num;

messages = db.messages.find({
  hasTag: null
}, {
  tags: 1
});

num = 0;

messages.forEach(function(message) {
  var hasTag, ref;
  num += 1;
  if (!(num % 10000)) {
    print("Scan num", num);
  }
  hasTag = ((ref = message.tags) != null ? ref.length : void 0) ? true : false;
  return db.messages.update({
    _id: message._id
  }, {
    $set: {
      hasTag: hasTag
    }
  });
});

print("Finish num", num);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var messages, num;

messages = db.messages.find({
  hasTag: null
}, {
  tags: 1
});

num = 0;

messages.forEach(function(message) {
  var hasTag, ref;
  num += 1;
  if (!(num % 10000)) {
    print("Scan num", num);
  }
  hasTag = ((ref = message.tags) != null ? ref.length : void 0) ? true : false;
  return db.messages.update({
    _id: message._id
  }, {
    $set: {
      hasTag: hasTag
    }
  });
});

print("Finish num", num);
```

Response:
messages = db.messages.find({hasTag: null}, {tags: 1})

num = 0

messages.forEach (message) ->
  num += 1
  print "Scan num", num unless num % 10000
  hasTag = if message.tags?.length then true else false
  db.messages.update({_id: message._id}, {$set: {hasTag: hasTag}})

print "Finish num", num


Prompt:
messages = db.messages.find({hasTag: null}, {tags: 1})

num = 0

messages.forEach (message) ->

Response:
num += 1
  print "Scan num", num unless num % 10000
  hasTag = if message.tags?.length then true else false
  db.messages.update({_id: message._id}, {$set: {hasTag: hasTag}})

print "Finish num", num


Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecateOptionForExecutable("Emacs", "emacs_path", "Path")


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecateOptionForExecutable("Emacs", "emacs_path", "Path")
```

Response:
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs = this.exe("emacs");
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.deprecateOptionForExecutable("Emacs", "emacs_path", "Path");
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.executables = [
    {
      name: "Emacs",
      cmd: "emacs",
      homepage: "https://www.gnu.org/software/emacs/",
      installation: "https://www.gnu.org/software/emacs/",
      version: {
        parse: function(text) {
          return text.match(/Emacs (\d+\.\d+\.\d+)/)[1];
        }
      }
    }
  ];

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs = this.exe("emacs");
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.deprecateOptionForExecutable("Emacs", "emacs_path", "Path");
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.executables = [
    {
      name: "Emacs",
      cmd: "emacs",
      homepage: "https://www.gnu.org/software/emacs/",
      installation: "https://www.gnu.org/software/emacs/",
      version: {
        parse: function(text) {
          return text.match(/Emacs (\d+\.\d+\.\d+)/)[1];
        }
      }
    }
  ];

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);
```

Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecateOptionForExecutable("Emacs", "emacs_path", "Path")


Prompt:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true

Response:
}

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecateOptionForExecutable("Emacs", "emacs_path", "Path")


Response:
@run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
    else
      emacs.run(args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )


Prompt:
@run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )

Response:
else
      emacs.run(args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )


Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.")


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.")
```

Response:
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs = this.exe("emacs");
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.");
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.executables = [
    {
      name: "Emacs",
      cmd: "emacs",
      homepage: "https://www.gnu.org/software/emacs/",
      installation: "https://www.gnu.org/software/emacs/",
      version: {
        parse: function(text) {
          return text.match(/Emacs (\d+\.\d+\.\d+)/)[1];
        }
      }
    }
  ];

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs = this.exe("emacs");
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.");
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.executables = [
    {
      name: "Emacs",
      cmd: "emacs",
      homepage: "https://www.gnu.org/software/emacs/",
      installation: "https://www.gnu.org/software/emacs/",
      version: {
        parse: function(text) {
          return text.match(/Emacs (\d+\.\d+\.\d+)/)[1];
        }
      }
    }
  ];

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);
```

Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.")


Prompt:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  executables: [
    {
      name: "Emacs"
      cmd: "emacs"
      homepage: "https://www.gnu.org/software/emacs/"
      installation: "https://www.gnu.org/software/emacs/"
      version: {
        parse: (text) -> text.match(/Emacs (\d+\.\d+\.\d+)/)[1]
      }
    }
  ]

  options: {
    Fortran: true

Response:
}

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)
    emacs = @exe("emacs")

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @deprecate("The \"emacs_path\" has been deprecated. Please switch to using the config with path \"Executables - Emacs - Path\" in Atom-Beautify package settings now.")


Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  isPreInstalled: false

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
    else
      @run("emacs", args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  isPreInstalled: false

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
    else
      @run("emacs", args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
```

Response:
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.run(emacs_path, args, {
          ignoreReturnCode: false
        }).then(() => {
          return this.readFile(tempFile);
        });
      } else {
        return this.run("emacs", args, {
          ignoreReturnCode: false
        }).then(() => {
          return this.readFile(tempFile);
        });
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.isPreInstalled = false;

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://www.gnu.org/software/emacs/
*/
"use strict";
var Beautifier, FortranBeautifier, path;

Beautifier = require('../beautifier');

path = require("path");

module.exports = FortranBeautifier = (function() {
  class FortranBeautifier extends Beautifier {
    beautify(text, language, options) {
      var args, emacs_path, emacs_script_path, tempFile;
      this.debug('fortran-beautifier', options);
      emacs_path = options.emacs_path;
      emacs_script_path = options.emacs_script_path;
      if (!emacs_script_path) {
        emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp");
      }
      this.debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path);
      args = ['--batch', '-l', emacs_script_path, '-f', 'f90-batch-indent-region', tempFile = this.tempFile("temp", text)];
      if (emacs_path) {
        return this.run(emacs_path, args, {
          ignoreReturnCode: false
        }).then(() => {
          return this.readFile(tempFile);
        });
      } else {
        return this.run("emacs", args, {
          ignoreReturnCode: false
        }).then(() => {
          return this.readFile(tempFile);
        });
      }
    }

  };

  FortranBeautifier.prototype.name = "Fortran Beautifier";

  FortranBeautifier.prototype.link = "https://www.gnu.org/software/emacs/";

  FortranBeautifier.prototype.isPreInstalled = false;

  FortranBeautifier.prototype.options = {
    Fortran: true
  };

  return FortranBeautifier;

}).call(this);
```

Response:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  isPreInstalled: false

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

    if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
    else
      @run("emacs", args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )


Prompt:
###
Requires https://www.gnu.org/software/emacs/
###

"use strict"
Beautifier = require('../beautifier')
path = require("path")

module.exports = class FortranBeautifier extends Beautifier
  name: "Fortran Beautifier"
  link: "https://www.gnu.org/software/emacs/"
  isPreInstalled: false

  options: {
    Fortran: true
  }

  beautify: (text, language, options) ->
    @debug('fortran-beautifier', options)

    emacs_path = options.emacs_path
    emacs_script_path = options.emacs_script_path

Response:
if not emacs_script_path
      emacs_script_path = path.resolve(__dirname, "emacs-fortran-formating-script.lisp")

    @debug('fortran-beautifier', 'emacs script path: ' + emacs_script_path)

    args = [
      '--batch'
      '-l'
      emacs_script_path
      '-f'
      'f90-batch-indent-region'
      tempFile = @tempFile("temp", text)
      ]

    if emacs_path
      @run(emacs_path, args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )
    else
      @run("emacs", args, {ignoreReturnCode: false})
        .then(=>
          @readFile(tempFile)
        )


Response:
"use strict"

defaults = require './defaults'
builder = require './builder'
parser = require './parser'
processors = require './processors'

exports.defaults = defaults.defaults

exports.processors = processors

class exports.ValidationError extends Error
  constructor: (message) ->
    @message = message

exports.Builder = builder.Builder

exports.Parser = parser.Parser

exports.parseString = parser.parseString
exports.parseStringPromise = parser.parseStringPromise


Prompt:
"use strict"

defaults = require './defaults'
builder = require './builder'
parser = require './parser'
processors = require './processors'

exports.defaults = defaults.defaults

exports.processors = processors

Response:
class exports.ValidationError extends Error
  constructor: (message) ->
    @message = message

exports.Builder = builder.Builder

exports.Parser = parser.Parser

exports.parseString = parser.parseString
exports.parseStringPromise = parser.parseStringPromise


Response:
"use strict"

defaults = require './defaults'
builder = require './builder'
parser = require './parser'
processors = require './processors'

exports.defaults = defaults.defaults

exports.processors = processors

class exports.ValidationError extends Error
  constructor: (message) ->
    @message = message

exports.Builder = builder.Builder

exports.Parser = parser.Parser

exports.parseString = parser.parseString


Prompt:
"use strict"

defaults = require './defaults'
builder = require './builder'
parser = require './parser'
processors = require './processors'

exports.defaults = defaults.defaults

exports.processors = processors

Response:
class exports.ValidationError extends Error
  constructor: (message) ->
    @message = message

exports.Builder = builder.Builder

exports.Parser = parser.Parser

exports.parseString = parser.parseString


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    normalizeTags: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    normalizeTags: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // normalize tag names to lower case
    normalizeTags: false,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    normalizeTags: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // normalize tag names to lower case
    normalizeTags: false,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    normalizeTags: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    normalizeTags: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless

Response:
ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    normalizeTags: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Response:
class exports.ValidationError extends Error
  constructor: (message) ->
    @message = message


Response:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = {}
    @options[key] = value for own key, value of exports.defaults["0.2"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>
      if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Prompt:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = {}
    @options[key] = value for own key, value of exports.defaults["0.2"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>

Response:
if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Response:
# need a place to store the node name
      obj["#name"] = if @options.normalizeTags then node.name.toLowerCase() else node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

      if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot
          # avoid circular references
          old = obj
          obj = {}


Prompt:
# need a place to store the node name
      obj["#name"] = if @options.normalizeTags then node.name.toLowerCase() else node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

Response:
if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot
          # avoid circular references
          old = obj
          obj = {}


Response:
obj[nodeName] = old

        @resultObject = obj
        @emit "end", @resultObject

    @saxParser.ontext = @saxParser.oncdata = (text) =>
      s = stack[stack.length - 1]
      if s
        s[charkey] += text

  parseString: (str, cb) =>
    if cb? and typeof cb is "function"
      @on "end", (result) ->
        @reset()
        cb null, result
      @on "error", (err) ->
        @reset()
        cb err

    if str.toString().trim() is ''
      @emit "end", null
      return true

    try
      @saxParser.write str.toString()
    catch ex
      if ex instanceof exports.ValidationError
        @emit("error", ex.message)
      else
        throw ex


Prompt:
obj[nodeName] = old

        @resultObject = obj
        @emit "end", @resultObject

    @saxParser.ontext = @saxParser.oncdata = (text) =>
      s = stack[stack.length - 1]
      if s
        s[charkey] += text

  parseString: (str, cb) =>
    if cb? and typeof cb is "function"
      @on "end", (result) ->
        @reset()
        cb null, result

Response:
@on "error", (err) ->
        @reset()
        cb err

    if str.toString().trim() is ''
      @emit "end", null
      return true

    try
      @saxParser.write str.toString()
    catch ex
      if ex instanceof exports.ValidationError
        @emit("error", ex.message)
      else
        throw ex


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // normalize tag names to lower case
    normalizeTags: false,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // normalize tag names to lower case
    normalizeTags: false,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # normalize tag names to lower case
    normalizeTags: false
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false

Response:
# ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Response:
# need a place to store the node name
      obj["#name"] = node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      if @options.normalizeTags
       nodeName = nodeName.toLowerCase()

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

      if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot


Prompt:
# need a place to store the node name
      obj["#name"] = node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      if @options.normalizeTags
       nodeName = nodeName.toLowerCase()

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

Response:
if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

      if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot


Response:
# avoid circular references
          old = obj
          obj = {}
          obj[nodeName] = old

        @resultObject = obj
        @emit "end", @resultObject

    @saxParser.ontext = @saxParser.oncdata = (text) =>
      s = stack[stack.length - 1]
      if s
        s[charkey] += text

  parseString: (str, cb) =>
    if cb? and typeof cb is "function"
      @on "end", (result) ->
        @reset()
        cb null, result
      @on "error", (err) ->
        @reset()
        cb err

    if str.toString().trim() is ''
      @emit "end", null
      return true

    try
      @saxParser.write str.toString()
    catch ex
      if ex instanceof exports.ValidationError
        @emit("error", ex.message)
      else
        throw ex


Prompt:
# avoid circular references
          old = obj
          obj = {}
          obj[nodeName] = old

        @resultObject = obj
        @emit "end", @resultObject

    @saxParser.ontext = @saxParser.oncdata = (text) =>
      s = stack[stack.length - 1]
      if s
        s[charkey] += text

  parseString: (str, cb) =>
    if cb? and typeof cb is "function"
      @on "end", (result) ->

Response:
@reset()
        cb null, result
      @on "error", (err) ->
        @reset()
        cb err

    if str.toString().trim() is ''
      @emit "end", null
      return true

    try
      @saxParser.write str.toString()
    catch ex
      if ex instanceof exports.ValidationError
        @emit("error", ex.message)
      else
        throw ex


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    charkey: "_",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless

Response:
ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    charkey: "_"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Response:
# need a place to store the node name
      obj["#name"] = node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

      if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot
          # avoid circular references
          old = obj
          obj = {}


Prompt:
# need a place to store the node name
      obj["#name"] = node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

Response:
if @options.validator?
        xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
        obj = @options.validator(xpath, s and s[nodeName], obj)

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot
          # avoid circular references
          old = obj
          obj = {}


Response:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = {}
    @options[key] = value for own key, value of exports.defaults["0.1"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>
      if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Prompt:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = {}
    @options[key] = value for own key, value of exports.defaults["0.1"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>

Response:
if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    explicitRoot: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    explicitRoot: true,
    validator: null
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false

Response:
# merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    explicitRoot: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    explicitRoot: true
    validator: null


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    validator: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    validator: null
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    validator: null
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false,
    validator: null
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false,
    validator: null
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    validator: null


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless

Response:
ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
    validator: null
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
    validator: null


Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false
```

Response:
var isEmpty;

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false
  }
};


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

isEmpty = function(thing) {
  return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
};

exports.defaults = {
  "0.1": {
    explicitCharkey: false,
    trim: true,
    // normalize implicates trimming, just so you know
    normalize: true,
    // set default attribute object key
    attrkey: "@",
    // set default char object key
    charkey: "#",
    // always put child nodes in an array
    explicitArray: false,
    // ignore all attributes regardless
    ignoreAttrs: false,
    // merge attributes and child elements onto parent object.  this may
    // cause collisions.
    mergeAttrs: false
  },
  "0.2": {
    explicitCharkey: false,
    trim: false,
    normalize: false,
    attrkey: "$",
    // not sure if # is the best idea, will investigate
    charkey: "#",
    explicitArray: true,
    ignoreAttrs: false,
    mergeAttrs: false
  }
};
```

Response:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false
    # ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false


Prompt:
isEmpty = (thing) ->
  return typeof thing is "object" && thing? && Object.keys(thing).length is 0

exports.defaults =
  "0.1":
    explicitCharkey: false
    trim: true
    # normalize implicates trimming, just so you know
    normalize: true
    # set default attribute object key
    attrkey: "@"
    # set default char object key
    charkey: "#"
    # always put child nodes in an array
    explicitArray: false

Response:
# ignore all attributes regardless
    ignoreAttrs: false
    # merge attributes and child elements onto parent object.  this may
    # cause collisions.
    mergeAttrs: false
  "0.2":
    explicitCharkey: false
    trim: false
    normalize: false
    attrkey: "$"
    # not sure if # is the best idea, will investigate
    charkey: "#"
    explicitArray: true
    ignoreAttrs: false
    mergeAttrs: false


Response:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = value for own key, value of exports.defaults["0.1"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>
      if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Prompt:
class exports.Parser extends events.EventEmitter
  constructor: (opts) ->
    # copy this versions default options
    @options = value for own key, value of exports.defaults["0.1"]
    # overwrite them with the specified options, if any
    @options[key] = value for own key, value of opts

    @reset()

  reset: =>
    # remove all previous listeners for events, to prevent event listener
    # accumulation
    @removeAllListeners()
    # make the SAX parser. tried trim and normalize, but they are not
    # very helpful
    @saxParser = sax.parser true, {
      trim: false,
      normalize: false
    }

    # emit one error event if the sax parser fails. this is mostly a hack, but
    # the sax parser isn't state of the art either.
    err = false
    @saxParser.onerror = (error) =>

Response:
if ! err
        err = true
        @emit "error", error

    # always use the '#' key, even if there are no subkeys
    # setting this property by and is deprecated, yet still supported.
    # better pass it as explicitCharkey option to the constructor
    @EXPLICIT_CHARKEY = @options.explicitCharkey
    @resultObject = null
    stack = []
    # aliases, so we don't have to type so much
    attrkey = @options.attrkey
    charkey = @options.charkey

    @saxParser.onopentag = (node) =>
      obj = {}
      obj[charkey] = ""
      unless @options.ignoreAttrs
        for own key of node.attributes
          if attrkey not of obj and not @options.mergeAttrs
            obj[attrkey] = {}
          if @options.mergeAttrs
            obj[key] = node.attributes[key]
          else
            obj[attrkey][key] = node.attributes[key]


Response:
# need a place to store the node name
      obj["#name"] = node.name
      stack.push obj

    @saxParser.onclosetag = =>
      obj = stack.pop()
      nodeName = obj["#name"]
      delete obj["#name"]

      s = stack[stack.length - 1]
      # remove the '#' key altogether if it's blank
      if obj[charkey].match(/^\s*$/)
        delete obj[charkey]
      else
        obj[charkey] = obj[charkey].trim() if @options.trim
        obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
        # also do away with '#' key altogether, if there's no subkeys
        # unless EXPLICIT_CHARKEY is set
        if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
          obj = obj[charkey]

      if @options.emptyTag != undefined && isEmpty obj
        obj = @options.emptyTag

      # check whether we closed all the open tags
      if stack.length > 0
        if not @options.explicitArray
          if nodeName not of s
            s[nodeName] = obj
          else if s[nodeName] instanceof Array
            s[nodeName].push obj
          else
            old = s[nodeName]
            s[nodeName] = [old]
            s[nodeName].push obj
        else
          if not (s[nodeName] instanceof Array)
            s[nodeName] = []
          s[nodeName].push obj
      else
        # if explicitRoot was specified, wrap stuff in the root tag name
        if @options.explicitRoot
          # avoid circular references
          old = obj
          obj = {}
          obj[nodeName] = old

        @resultObject = obj
        @emit "end", @resultObject