Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
return @

  # Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)
```

Response:
return this({
  // Creates a general entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  // `value.nData` notation declaration
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.docType(this, this.options.writer.filterOptions(options));
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
return this({
  // Creates a general entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  // `value.nData` notation declaration
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.docType(this, this.options.writer.filterOptions(options));
  }
});
```

Response:
return @

  # Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)


Prompt:
return @

  # Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value

Response:
@children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)


Response:
# Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject
```

Response:
// Aliases
({
  ele: function(name, value) {
    return this.element(name, value);
  },
  att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
  },
  ent: function(name, value) {
    return this.entity(name, value);
  },
  pent: function(name, value) {
    return this.pEntity(name, value);
  },
  not: function(name, value) {
    return this.notation(name, value);
  },
  up: function() {
    return this.root() || this.documentObject;
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Aliases
({
  ele: function(name, value) {
    return this.element(name, value);
  },
  att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
  },
  ent: function(name, value) {
    return this.entity(name, value);
  },
  pent: function(name, value) {
    return this.pEntity(name, value);
  },
  not: function(name, value) {
    return this.notation(name, value);
  },
  up: function() {
    return this.root() || this.documentObject;
  }
});
```

Response:
# Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
# Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue

Response:
ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Response:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @name = "!DOCTYPE"

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @name = "!DOCTYPE"

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @
```

Response:
var XMLDocType;

module.exports = XMLDocType = class XMLDocType extends XMLNode {
  // Initializes a new instance of `XMLDocType`

  // `parent` the document object

  // `pubID` public identifier of the external subset
  // `sysID` system identifier of the external subset
  constructor(parent, pubID, sysID) {
    super(parent);
    this.name = "!DOCTYPE";
    this.documentObject = parent;
    // arguments may also be passed as an object
    if (isObject(pubID)) {
      ({pubID, sysID} = pubID);
    }
    if (sysID == null) {
      [sysID, pubID] = [pubID, sysID];
    }
    if (pubID != null) {
      this.pubID = this.stringify.dtdPubID(pubID);
    }
    if (sysID != null) {
      this.sysID = this.stringify.dtdSysID(sysID);
    }
  }

  // Creates an element type declaration

  // `name` element name
  // `value` element content (defaults to #PCDATA)
  element(name, value) {
    var child;
    child = new XMLDTDElement(this, name, value);
    this.children.push(child);
    return this;
  }

  // Creates an attribute declaration

  // `elementName` the name of the element containing this attribute
  // `attributeName` attribute name
  // `attributeType` type of the attribute (defaults to CDATA)
  // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  //                    #DEFAULT) (defaults to #IMPLIED)
  // `defaultValue` default value of the attribute
  //                (only used for #FIXED or #DEFAULT)
  attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    var child;
    child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
    this.children.push(child);
    return this;
  }

};


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

module.exports = XMLDocType = class XMLDocType extends XMLNode {
  // Initializes a new instance of `XMLDocType`

  // `parent` the document object

  // `pubID` public identifier of the external subset
  // `sysID` system identifier of the external subset
  constructor(parent, pubID, sysID) {
    super(parent);
    this.name = "!DOCTYPE";
    this.documentObject = parent;
    // arguments may also be passed as an object
    if (isObject(pubID)) {
      ({pubID, sysID} = pubID);
    }
    if (sysID == null) {
      [sysID, pubID] = [pubID, sysID];
    }
    if (pubID != null) {
      this.pubID = this.stringify.dtdPubID(pubID);
    }
    if (sysID != null) {
      this.sysID = this.stringify.dtdSysID(sysID);
    }
  }

  // Creates an element type declaration

  // `name` element name
  // `value` element content (defaults to #PCDATA)
  element(name, value) {
    var child;
    child = new XMLDTDElement(this, name, value);
    this.children.push(child);
    return this;
  }

  // Creates an attribute declaration

  // `elementName` the name of the element containing this attribute
  // `attributeName` attribute name
  // `attributeType` type of the attribute (defaults to CDATA)
  // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  //                    #DEFAULT) (defaults to #IMPLIED)
  // `defaultValue` default value of the attribute
  //                (only used for #FIXED or #DEFAULT)
  attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    var child;
    child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
    this.children.push(child);
    return this;
  }

};
```

Response:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @name = "!DOCTYPE"

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Prompt:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @name = "!DOCTYPE"

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

Response:
# Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)

  # Aliases


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)

  # Aliases
```

Response:
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.docType(this, this.options.writer.filterOptions(options));
  }
});

// Aliases


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.docType(this, this.options.writer.filterOptions(options));
  }
});

// Aliases
```

Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)

  # Aliases


Prompt:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

Response:
# Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.docType @, @options.writer.filterOptions(options)

  # Aliases


Response:
ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject
```

Response:
({
  ele: function(name, value) {
    return this.element(name, value({
      att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
        return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
      },
      ent: function(name, value) {
        return this.entity(name, value);
      },
      pent: function(name, value) {
        return this.pEntity(name, value);
      },
      not: function(name, value) {
        return this.notation(name, value);
      },
      up: function() {
        return this.root() || this.documentObject;
      }
    }));
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
({
  ele: function(name, value) {
    return this.element(name, value({
      att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
        return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
      },
      ent: function(name, value) {
        return this.entity(name, value);
      },
      pent: function(name, value) {
        return this.pEntity(name, value);
      },
      not: function(name, value) {
        return this.notation(name, value);
      },
      up: function() {
        return this.root() || this.documentObject;
      }
    }));
  }
});
```

Response:
ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    @attList elementName, attributeName, attributeType, defaultValueType, defaultValue

Response:
ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases
```

Response:
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.set(options).docType(this);
  }
});

// Aliases


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.set(options).docType(this);
  }
});

// Aliases
```

Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases


Prompt:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

Response:
# Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases


Response:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @
```

Response:
var XMLDocType;

module.exports = XMLDocType = class XMLDocType extends XMLNode {
  // Initializes a new instance of `XMLDocType`

  // `parent` the document object

  // `pubID` public identifier of the external subset
  // `sysID` system identifier of the external subset
  constructor(parent, pubID, sysID) {
    super(parent);
    this.documentObject = parent;
    // arguments may also be passed as an object
    if (isObject(pubID)) {
      ({pubID, sysID} = pubID);
    }
    if (sysID == null) {
      [sysID, pubID] = [pubID, sysID];
    }
    if (pubID != null) {
      this.pubID = this.stringify.dtdPubID(pubID);
    }
    if (sysID != null) {
      this.sysID = this.stringify.dtdSysID(sysID);
    }
  }

  // Creates an element type declaration

  // `name` element name
  // `value` element content (defaults to #PCDATA)
  element(name, value) {
    var child;
    child = new XMLDTDElement(this, name, value);
    this.children.push(child);
    return this;
  }

  // Creates an attribute declaration

  // `elementName` the name of the element containing this attribute
  // `attributeName` attribute name
  // `attributeType` type of the attribute (defaults to CDATA)
  // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  //                    #DEFAULT) (defaults to #IMPLIED)
  // `defaultValue` default value of the attribute
  //                (only used for #FIXED or #DEFAULT)
  attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    var child;
    child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
    this.children.push(child);
    return this;
  }

};


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

module.exports = XMLDocType = class XMLDocType extends XMLNode {
  // Initializes a new instance of `XMLDocType`

  // `parent` the document object

  // `pubID` public identifier of the external subset
  // `sysID` system identifier of the external subset
  constructor(parent, pubID, sysID) {
    super(parent);
    this.documentObject = parent;
    // arguments may also be passed as an object
    if (isObject(pubID)) {
      ({pubID, sysID} = pubID);
    }
    if (sysID == null) {
      [sysID, pubID] = [pubID, sysID];
    }
    if (pubID != null) {
      this.pubID = this.stringify.dtdPubID(pubID);
    }
    if (sysID != null) {
      this.sysID = this.stringify.dtdSysID(sysID);
    }
  }

  // Creates an element type declaration

  // `name` element name
  // `value` element content (defaults to #PCDATA)
  element(name, value) {
    var child;
    child = new XMLDTDElement(this, name, value);
    this.children.push(child);
    return this;
  }

  // Creates an attribute declaration

  // `elementName` the name of the element containing this attribute
  // `attributeName` attribute name
  // `attributeType` type of the attribute (defaults to CDATA)
  // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  //                    #DEFAULT) (defaults to #IMPLIED)
  // `defaultValue` default value of the attribute
  //                (only used for #FIXED or #DEFAULT)
  attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
    var child;
    child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
    this.children.push(child);
    return this;
  }

};
```

Response:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

  # Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Prompt:
module.exports = class XMLDocType extends XMLNode

  # Initializes a new instance of `XMLDocType`
  #
  # `parent` the document object
  #
  # `pubID` public identifier of the external subset
  # `sysID` system identifier of the external subset
  constructor: (parent, pubID, sysID) ->
    super parent

    @documentObject = parent

    # arguments may also be passed as an object
    if isObject pubID
      { pubID, sysID } = pubID

    if not sysID?
      [sysID, pubID] = [pubID, sysID]

    @pubID = @stringify.dtdPubID pubID if pubID?
    @sysID = @stringify.dtdSysID sysID if sysID?

Response:
# Creates an element type declaration
  #
  # `name` element name
  # `value` element content (defaults to #PCDATA)
  element: (name, value) ->
    child = new XMLDTDElement @, name, value
    @children.push child
    return @

  # Creates an attribute declaration
  #
  # `elementName` the name of the element containing this attribute
  # `attributeName` attribute name
  # `attributeType` type of the attribute (defaults to CDATA)
  # `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
  #                    #DEFAULT) (defaults to #IMPLIED)
  # `defaultValue` default value of the attribute
  #                (only used for #FIXED or #DEFAULT)
  attList: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
    child = new XMLDTDAttList @, elementName, attributeName, attributeType, defaultValueType, defaultValue
    @children.push child
    return @


Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->
```

Response:
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.set(options).docType(this);
  },
  // Aliases
  ele: function(name, value) {
    return this.element(name, value);
  },
  att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {}
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Creates a general entity declaration

// `name` the name of the entity
// `value` internal entity value or an object with external entity details
// `value.pubID` public identifier
// `value.sysID` system identifier
// `value.nData` notation declaration
({
  entity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, false, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a parameter entity declaration

  // `name` the name of the entity
  // `value` internal entity value or an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  pEntity: function(name, value) {
    var child;
    child = new XMLDTDEntity(this, true, name, value);
    this.children.push(child);
    return this;
  },
  // Creates a NOTATION declaration

  // `name` the name of the notation
  // `value` an object with external entity details
  // `value.pubID` public identifier
  // `value.sysID` system identifier
  notation: function(name, value) {
    var child;
    child = new XMLDTDNotation(this, name, value);
    this.children.push(child);
    return this;
  },
  // Converts to string

  // `options.pretty` pretty prints the result
  // `options.indent` indentation for pretty print
  // `options.offset` how many indentations to add to every line for pretty print
  // `options.newline` newline sequence for pretty print
  toString: function(options) {
    return this.options.writer.set(options).docType(this);
  },
  // Aliases
  ele: function(name, value) {
    return this.element(name, value);
  },
  att: function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {}
});
```

Response:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

  # Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->


Prompt:
# Creates a general entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  # `value.nData` notation declaration
  entity: (name, value) ->
    child = new XMLDTDEntity @, false, name, value
    @children.push child
    return @

  # Creates a parameter entity declaration
  #
  # `name` the name of the entity
  # `value` internal entity value or an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  pEntity: (name, value) ->
    child = new XMLDTDEntity @, true, name, value
    @children.push child
    return @

Response:
# Creates a NOTATION declaration
  #
  # `name` the name of the notation
  # `value` an object with external entity details
  # `value.pubID` public identifier
  # `value.sysID` system identifier
  notation: (name, value) ->
    child = new XMLDTDNotation @, name, value
    @children.push child
    return @

  # Converts to string
  #
  # `options.pretty` pretty prints the result
  # `options.indent` indentation for pretty print
  # `options.offset` how many indentations to add to every line for pretty print
  # `options.newline` newline sequence for pretty print
  toString: (options) ->
    @options.writer.set(options).docType @

  # Aliases
  ele: (name, value) -> @element name, value
  att: (elementName, attributeName, attributeType, defaultValueType, defaultValue) ->


Response:
@attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
@attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject
```

Response:
this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue({
  ent: function(name, value) {
    return this.entity(name, value);
  },
  pent: function(name, value) {
    return this.pEntity(name, value);
  },
  not: function(name, value) {
    return this.notation(name, value);
  },
  up: function() {
    return this.root() || this.documentObject;
  }
}));


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue({
  ent: function(name, value) {
    return this.entity(name, value);
  },
  pent: function(name, value) {
    return this.pEntity(name, value);
  },
  not: function(name, value) {
    return this.notation(name, value);
  },
  up: function() {
    return this.root() || this.documentObject;
  }
}));
```

Response:
@attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value
  pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Prompt:
@attList elementName, attributeName, attributeType, defaultValueType, defaultValue
  ent: (name, value) -> @entity name, value

Response:
pent: (name, value) -> @pEntity name, value
  not: (name, value) -> @notation name, value
  up: () -> @root() or @documentObject


Response:
# Importing
# ---------

unless window? or testingBrowser?
  test "coffeescript modules can be imported and executed", ->

    magicKey = __filename
    magicValue = 0xFFFF

    if global[magicKey]?
      if exports?
        local = magicValue
        exports.method = -> local
    else
      global[magicKey] = {}
      if require?.extensions?
        ok require(__filename).method() is magicValue
      delete global[magicKey]

  test "javascript modules can be imported", ->
    magicVal = 1
    for module in 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "coffeescript modules can be imported", ->
    magicVal = 2
    for module in '.import.coffee import.coffee import.extension.coffee'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "literate coffeescript modules can be imported", ->
    magicVal = 3
    # Leading space intentional to check for index.coffee.md
    for module in ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
# Importing
# ---------

unless window? or testingBrowser?
  test "coffeescript modules can be imported and executed", ->

    magicKey = __filename
    magicValue = 0xFFFF

    if global[magicKey]?
      if exports?
        local = magicValue
        exports.method = -> local
    else
      global[magicKey] = {}
      if require?.extensions?
        ok require(__filename).method() is magicValue
      delete global[magicKey]

  test "javascript modules can be imported", ->
    magicVal = 1
    for module in 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "coffeescript modules can be imported", ->
    magicVal = 2
    for module in '.import.coffee import.coffee import.extension.coffee'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "literate coffeescript modules can be imported", ->
    magicVal = 3
    # Leading space intentional to check for index.coffee.md
    for module in ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module
```

Response:
// Importing
// ---------
if (!((typeof window !== "undefined" && window !== null) || (typeof testingBrowser !== "undefined" && testingBrowser !== null))) {
  test("coffeescript modules can be imported and executed", function() {
    var local, magicKey, magicValue;
    magicKey = __filename;
    magicValue = 0xFFFF;
    if (global[magicKey] != null) {
      if (typeof exports !== "undefined" && exports !== null) {
        local = magicValue;
        return exports.method = function() {
          return local;
        };
      }
    } else {
      global[magicKey] = {};
      if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) {
        ok(require(__filename).method() === magicValue);
      }
      return delete global[magicKey];
    }
  });
  test("javascript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 1;
    ref = 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split(' ');
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
  test("coffeescript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 2;
    ref = '.import.coffee import.coffee import.extension.coffee'.split(' ');
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
  test("literate coffeescript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 3;
    ref = ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split(' ');
    // Leading space intentional to check for index.coffee.md
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
}


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
// Importing
// ---------
if (!((typeof window !== "undefined" && window !== null) || (typeof testingBrowser !== "undefined" && testingBrowser !== null))) {
  test("coffeescript modules can be imported and executed", function() {
    var local, magicKey, magicValue;
    magicKey = __filename;
    magicValue = 0xFFFF;
    if (global[magicKey] != null) {
      if (typeof exports !== "undefined" && exports !== null) {
        local = magicValue;
        return exports.method = function() {
          return local;
        };
      }
    } else {
      global[magicKey] = {};
      if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) {
        ok(require(__filename).method() === magicValue);
      }
      return delete global[magicKey];
    }
  });
  test("javascript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 1;
    ref = 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split(' ');
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
  test("coffeescript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 2;
    ref = '.import.coffee import.coffee import.extension.coffee'.split(' ');
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
  test("literate coffeescript modules can be imported", function() {
    var base, i, len, magicVal, module, ref, results;
    magicVal = 3;
    ref = ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split(' ');
    // Leading space intentional to check for index.coffee.md
    results = [];
    for (i = 0, len = ref.length; i < len; i++) {
      module = ref[i];
      results.push(ok((typeof (base = require(`./importing/${module}`)).value === "function" ? base.value() : void 0) === magicVal, module));
    }
    return results;
  });
}
```

Response:
# Importing
# ---------

unless window? or testingBrowser?
  test "coffeescript modules can be imported and executed", ->

    magicKey = __filename
    magicValue = 0xFFFF

    if global[magicKey]?
      if exports?
        local = magicValue
        exports.method = -> local
    else
      global[magicKey] = {}
      if require?.extensions?
        ok require(__filename).method() is magicValue
      delete global[magicKey]

  test "javascript modules can be imported", ->
    magicVal = 1
    for module in 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "coffeescript modules can be imported", ->
    magicVal = 2
    for module in '.import.coffee import.coffee import.extension.coffee'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "literate coffeescript modules can be imported", ->
    magicVal = 3
    # Leading space intentional to check for index.coffee.md
    for module in ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module


Prompt:
# Importing
# ---------

unless window? or testingBrowser?
  test "coffeescript modules can be imported and executed", ->

    magicKey = __filename
    magicValue = 0xFFFF

    if global[magicKey]?
      if exports?
        local = magicValue
        exports.method = -> local
    else
      global[magicKey] = {}
      if require?.extensions?
        ok require(__filename).method() is magicValue

Response:
delete global[magicKey]

  test "javascript modules can be imported", ->
    magicVal = 1
    for module in 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "coffeescript modules can be imported", ->
    magicVal = 2
    for module in '.import.coffee import.coffee import.extension.coffee'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module

  test "literate coffeescript modules can be imported", ->
    magicVal = 3
    # Leading space intentional to check for index.coffee.md
    for module in ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split ' '
      ok require("./importing/#{module}").value?() is magicVal, module


Response:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->

    doc = xml({ factura: {'@id':'comprabante','@version':'2.1.0' }}, {encoding: 'UTF-8'})
      .ele('identificacionComprador', '1303963712')
    doc.ele('node')

    for i in [1..3]
      person = xml('person').att('id', i)
      doc.importDocument(person)

    eq(
      doc.end()
      '<?xml version="1.0" encoding="UTF-8"?>' +
      '<factura id="comprabante" version="2.1.0">' +
        '<identificacionComprador>' +
          '1303963712' +
          '<node/>' +
          '<person id="1"/>' +
          '<person id="2"/>' +
          '<person id="3"/>' +
        '</identificacionComprador>' +
      '</factura>'
    )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->

    doc = xml({ factura: {'@id':'comprabante','@version':'2.1.0' }}, {encoding: 'UTF-8'})
      .ele('identificacionComprador', '1303963712')
    doc.ele('node')

    for i in [1..3]
      person = xml('person').att('id', i)
      doc.importDocument(person)

    eq(
      doc.end()
      '<?xml version="1.0" encoding="UTF-8"?>' +
      '<factura id="comprabante" version="2.1.0">' +
        '<identificacionComprador>' +
          '1303963712' +
          '<node/>' +
          '<person id="1"/>' +
          '<person id="2"/>' +
          '<person id="3"/>' +
        '</identificacionComprador>' +
      '</factura>'
    )
```

Response:
suite('Tests specific to issues:', function() {
  return test('importDocument overwrites parent declaration: Issue 175', function() {
    var doc, i, j, person;
    doc = xml({
      factura: {
        '@id': 'comprabante',
        '@version': '2.1.0'
      }
    }, {
      encoding: 'UTF-8'
    }).ele('identificacionComprador', '1303963712');
    doc.ele('node');
    for (i = j = 1; j <= 3; i = ++j) {
      person = xml('person').att('id', i);
      doc.importDocument(person);
    }
    return eq(doc.end(), '<?xml version="1.0" encoding="UTF-8"?>' + '<factura id="comprabante" version="2.1.0">' + '<identificacionComprador>' + '1303963712' + '<node/>' + '<person id="1"/>' + '<person id="2"/>' + '<person id="3"/>' + '</identificacionComprador>' + '</factura>');
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
suite('Tests specific to issues:', function() {
  return test('importDocument overwrites parent declaration: Issue 175', function() {
    var doc, i, j, person;
    doc = xml({
      factura: {
        '@id': 'comprabante',
        '@version': '2.1.0'
      }
    }, {
      encoding: 'UTF-8'
    }).ele('identificacionComprador', '1303963712');
    doc.ele('node');
    for (i = j = 1; j <= 3; i = ++j) {
      person = xml('person').att('id', i);
      doc.importDocument(person);
    }
    return eq(doc.end(), '<?xml version="1.0" encoding="UTF-8"?>' + '<factura id="comprabante" version="2.1.0">' + '<identificacionComprador>' + '1303963712' + '<node/>' + '<person id="1"/>' + '<person id="2"/>' + '<person id="3"/>' + '</identificacionComprador>' + '</factura>');
  });
});
```

Response:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->

    doc = xml({ factura: {'@id':'comprabante','@version':'2.1.0' }}, {encoding: 'UTF-8'})
      .ele('identificacionComprador', '1303963712')
    doc.ele('node')

    for i in [1..3]
      person = xml('person').att('id', i)
      doc.importDocument(person)

    eq(
      doc.end()
      '<?xml version="1.0" encoding="UTF-8"?>' +
      '<factura id="comprabante" version="2.1.0">' +
        '<identificacionComprador>' +
          '1303963712' +
          '<node/>' +
          '<person id="1"/>' +
          '<person id="2"/>' +
          '<person id="3"/>' +
        '</identificacionComprador>' +
      '</factura>'
    )


Prompt:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->

    doc = xml({ factura: {'@id':'comprabante','@version':'2.1.0' }}, {encoding: 'UTF-8'})
      .ele('identificacionComprador', '1303963712')
    doc.ele('node')

    for i in [1..3]
      person = xml('person').att('id', i)
      doc.importDocument(person)

    eq(

Response:
doc.end()
      '<?xml version="1.0" encoding="UTF-8"?>' +
      '<factura id="comprabante" version="2.1.0">' +
        '<identificacionComprador>' +
          '1303963712' +
          '<node/>' +
          '<person id="1"/>' +
          '<person id="2"/>' +
          '<person id="3"/>' +
        '</identificacionComprador>' +
      '</factura>'
    )


Response:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->
    imported = xml('import', { version: "1.0", encoding: "utf-8" })
      .ele('node', 'imported')

    eq(
      xml('test', {version : "1.1", encoding: "de-de"})
        .importDocument(imported)
        .end()
      '<?xml version="1.1" encoding="de-de"?>' +
        '<test>' +
          '<import>' +
            '<node>imported</node>' +
          '</import>' +
        '</test>'
    )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->
    imported = xml('import', { version: "1.0", encoding: "utf-8" })
      .ele('node', 'imported')

    eq(
      xml('test', {version : "1.1", encoding: "de-de"})
        .importDocument(imported)
        .end()
      '<?xml version="1.1" encoding="de-de"?>' +
        '<test>' +
          '<import>' +
            '<node>imported</node>' +
          '</import>' +
        '</test>'
    )
```

Response:
suite('Tests specific to issues:', function() {
  return test('importDocument overwrites parent declaration: Issue 175', function() {
    var imported;
    imported = xml('import', {
      version: "1.0",
      encoding: "utf-8"
    }).ele('node', 'imported');
    return eq(xml('test', {
      version: "1.1",
      encoding: "de-de"
    }).importDocument(imported).end(), '<?xml version="1.1" encoding="de-de"?>' + '<test>' + '<import>' + '<node>imported</node>' + '</import>' + '</test>');
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
suite('Tests specific to issues:', function() {
  return test('importDocument overwrites parent declaration: Issue 175', function() {
    var imported;
    imported = xml('import', {
      version: "1.0",
      encoding: "utf-8"
    }).ele('node', 'imported');
    return eq(xml('test', {
      version: "1.1",
      encoding: "de-de"
    }).importDocument(imported).end(), '<?xml version="1.1" encoding="de-de"?>' + '<test>' + '<import>' + '<node>imported</node>' + '</import>' + '</test>');
  });
});
```

Response:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->
    imported = xml('import', { version: "1.0", encoding: "utf-8" })
      .ele('node', 'imported')

    eq(
      xml('test', {version : "1.1", encoding: "de-de"})
        .importDocument(imported)
        .end()
      '<?xml version="1.1" encoding="de-de"?>' +
        '<test>' +
          '<import>' +
            '<node>imported</node>' +
          '</import>' +
        '</test>'
    )


Prompt:
suite 'Tests specific to issues:', ->
  test 'importDocument overwrites parent declaration: Issue 175', ->
    imported = xml('import', { version: "1.0", encoding: "utf-8" })
      .ele('node', 'imported')

    eq(
      xml('test', {version : "1.1", encoding: "de-de"})
        .importDocument(imported)

Response:
.end()
      '<?xml version="1.1" encoding="de-de"?>' +
        '<test>' +
          '<import>' +
            '<node>imported</node>' +
          '</import>' +
        '</test>'
    )


Response:
drag = ($injector) ->
    # ----------------------------------------
    # provider
    # ----------------------------------------

    # ----------------------------------------
    # properties
    # ----------------------------------------
    @data =
        # all draggable objects
        draggables: []
        # all droppable objects
        droppables: []

    # ----------------------------------------
    # event hooks
    # ----------------------------------------
    @eventMouseDown = ->
    @eventMouseMove = ->
    @eventMouseUp = ->
    $ =>
        $(document).on 'mousedown', (e) => @eventMouseDown e
        $(document).on 'mousemove', (e) => @eventMouseMove e
        $(document).on 'mouseup', (e) => @eventMouseUp e

    # ----------------------------------------
    # private methods
    # ----------------------------------------
    @makeMirrorMode = ($element) =>
        result =
            mode: 'mirror'
            maternal: $element[0]
            element: null

        $element.on 'mousedown', (e) =>
            e.preventDefault()

            $clone = $element.clone()
            result.element = $clone[0]
            $clone.css
                width: $element.width()
                height: $element.height()
            $clone.addClass "fb-draggable form-horizontal dragging"
            @eventMouseMove = (e) =>
                $clone.offset
                    left: e.pageX - $clone.width() / 2
                    top: e.pageY - $clone.height() / 2


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
drag = ($injector) ->
    # ----------------------------------------
    # provider
    # ----------------------------------------

    # ----------------------------------------
    # properties
    # ----------------------------------------
    @data =
        # all draggable objects
        draggables: []
        # all droppable objects
        droppables: []

    # ----------------------------------------
    # event hooks
    # ----------------------------------------
    @eventMouseDown = ->
    @eventMouseMove = ->
    @eventMouseUp = ->
    $ =>
        $(document).on 'mousedown', (e) => @eventMouseDown e
        $(document).on 'mousemove', (e) => @eventMouseMove e
        $(document).on 'mouseup', (e) => @eventMouseUp e

    # ----------------------------------------
    # private methods
    # ----------------------------------------
    @makeMirrorMode = ($element) =>
        result =
            mode: 'mirror'
            maternal: $element[0]
            element: null

        $element.on 'mousedown', (e) =>
            e.preventDefault()

            $clone = $element.clone()
            result.element = $clone[0]
            $clone.css
                width: $element.width()
                height: $element.height()
            $clone.addClass "fb-draggable form-horizontal dragging"
            @eventMouseMove = (e) =>
                $clone.offset
                    left: e.pageX - $clone.width() / 2
                    top: e.pageY - $clone.height() / 2
```

Response:
var drag;

drag = function($injector) {
  // ----------------------------------------
  // provider
  // ----------------------------------------

  // ----------------------------------------
  // properties
  // ----------------------------------------
  this.data = {
    // all draggable objects
    draggables: [],
    // all droppable objects
    droppables: []
  };
  // ----------------------------------------
  // event hooks
  // ----------------------------------------
  this.eventMouseDown = function() {};
  this.eventMouseMove = function() {};
  this.eventMouseUp = function() {};
  $(() => {
    $(document).on('mousedown', (e) => {
      return this.eventMouseDown(e);
    });
    $(document).on('mousemove', (e) => {
      return this.eventMouseMove(e);
    });
    return $(document).on('mouseup', (e) => {
      return this.eventMouseUp(e);
    });
  });
  // ----------------------------------------
  // private methods
  // ----------------------------------------
  return this.makeMirrorMode = ($element) => {
    var result;
    result = {
      mode: 'mirror',
      maternal: $element[0],
      element: null
    };
    return $element.on('mousedown', (e) => {
      var $clone;
      e.preventDefault();
      $clone = $element.clone();
      result.element = $clone[0];
      $clone.css({
        width: $element.width(),
        height: $element.height()
      });
      $clone.addClass("fb-draggable form-horizontal dragging");
      return this.eventMouseMove = (e) => {
        return $clone.offset({
          left: e.pageX - $clone.width() / 2,
          top: e.pageY - $clone.height() / 2
        });
      };
    });
  };
};


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

drag = function($injector) {
  // ----------------------------------------
  // provider
  // ----------------------------------------

  // ----------------------------------------
  // properties
  // ----------------------------------------
  this.data = {
    // all draggable objects
    draggables: [],
    // all droppable objects
    droppables: []
  };
  // ----------------------------------------
  // event hooks
  // ----------------------------------------
  this.eventMouseDown = function() {};
  this.eventMouseMove = function() {};
  this.eventMouseUp = function() {};
  $(() => {
    $(document).on('mousedown', (e) => {
      return this.eventMouseDown(e);
    });
    $(document).on('mousemove', (e) => {
      return this.eventMouseMove(e);
    });
    return $(document).on('mouseup', (e) => {
      return this.eventMouseUp(e);
    });
  });
  // ----------------------------------------
  // private methods
  // ----------------------------------------
  return this.makeMirrorMode = ($element) => {
    var result;
    result = {
      mode: 'mirror',
      maternal: $element[0],
      element: null
    };
    return $element.on('mousedown', (e) => {
      var $clone;
      e.preventDefault();
      $clone = $element.clone();
      result.element = $clone[0];
      $clone.css({
        width: $element.width(),
        height: $element.height()
      });
      $clone.addClass("fb-draggable form-horizontal dragging");
      return this.eventMouseMove = (e) => {
        return $clone.offset({
          left: e.pageX - $clone.width() / 2,
          top: e.pageY - $clone.height() / 2
        });
      };
    });
  };
};
```

Response:
drag = ($injector) ->
    # ----------------------------------------
    # provider
    # ----------------------------------------

    # ----------------------------------------
    # properties
    # ----------------------------------------
    @data =
        # all draggable objects
        draggables: []
        # all droppable objects
        droppables: []

    # ----------------------------------------
    # event hooks
    # ----------------------------------------
    @eventMouseDown = ->
    @eventMouseMove = ->
    @eventMouseUp = ->
    $ =>
        $(document).on 'mousedown', (e) => @eventMouseDown e
        $(document).on 'mousemove', (e) => @eventMouseMove e
        $(document).on 'mouseup', (e) => @eventMouseUp e

    # ----------------------------------------
    # private methods
    # ----------------------------------------
    @makeMirrorMode = ($element) =>
        result =
            mode: 'mirror'
            maternal: $element[0]
            element: null

        $element.on 'mousedown', (e) =>
            e.preventDefault()

            $clone = $element.clone()
            result.element = $clone[0]
            $clone.css
                width: $element.width()
                height: $element.height()
            $clone.addClass "fb-draggable form-horizontal dragging"
            @eventMouseMove = (e) =>
                $clone.offset
                    left: e.pageX - $clone.width() / 2
                    top: e.pageY - $clone.height() / 2


Prompt:
drag = ($injector) ->
    # ----------------------------------------
    # provider
    # ----------------------------------------

    # ----------------------------------------
    # properties
    # ----------------------------------------
    @data =
        # all draggable objects
        draggables: []
        # all droppable objects
        droppables: []

    # ----------------------------------------
    # event hooks
    # ----------------------------------------
    @eventMouseDown = ->
    @eventMouseMove = ->
    @eventMouseUp = ->
    $ =>
        $(document).on 'mousedown', (e) => @eventMouseDown e
        $(document).on 'mousemove', (e) => @eventMouseMove e

Response:
$(document).on 'mouseup', (e) => @eventMouseUp e

    # ----------------------------------------
    # private methods
    # ----------------------------------------
    @makeMirrorMode = ($element) =>
        result =
            mode: 'mirror'
            maternal: $element[0]
            element: null

        $element.on 'mousedown', (e) =>
            e.preventDefault()

            $clone = $element.clone()
            result.element = $clone[0]
            $clone.css
                width: $element.width()
                height: $element.height()
            $clone.addClass "fb-draggable form-horizontal dragging"
            @eventMouseMove = (e) =>
                $clone.offset
                    left: e.pageX - $clone.width() / 2
                    top: e.pageY - $clone.height() / 2


Response:
@eventMouseUp = (e) =>
                @eventMouseMove = ->
                @eventMouseUp = ->
                result.element = null
                $clone.remove()
            $('body').append $clone
            @eventMouseMove e   # setup left & top of the element
        result

    @makeDragMode = ($element) =>
        result =
            mode: 'drag'
            maternal: null
            element: $element[0]

        $element.addClass 'fb-draggable'
        $element.on 'mousedown', (e) =>
            e.preventDefault()
            return if $element.hasClass 'dragging'

            $element.css
                width: $element.width()
                height: $element.height()
            $element.addClass 'dragging'
            @eventMouseMove = (e) =>
                $element.offset
                    left: e.pageX - $element.width() / 2
                    top: e.pageY - $element.height() / 2
            @eventMouseUp = (e) =>
                @eventMouseMove = ->
                @eventMouseUp = ->
                $element.css
                    width: ''
                    height: ''
                    left: ''
                    top: ''
                $element.removeClass 'dragging'
            @eventMouseMove e   # setup left & top of the element
        result

    # ----------------------------------------
    # public methods
    # ----------------------------------------
    @draggable = ($element, options={}) =>
        ###
        Make the element could be drag.
        @param element: The jQuery element.
        @param options: Options


Prompt:
@eventMouseUp = (e) =>
                @eventMouseMove = ->
                @eventMouseUp = ->
                result.element = null
                $clone.remove()
            $('body').append $clone
            @eventMouseMove e   # setup left & top of the element
        result

    @makeDragMode = ($element) =>
        result =
            mode: 'drag'
            maternal: null
            element: $element[0]

        $element.addClass 'fb-draggable'
        $element.on 'mousedown', (e) =>
            e.preventDefault()
            return if $element.hasClass 'dragging'

            $element.css
                width: $element.width()
                height: $element.height()
            $element.addClass 'dragging'

Response:
@eventMouseMove = (e) =>
                $element.offset
                    left: e.pageX - $element.width() / 2
                    top: e.pageY - $element.height() / 2
            @eventMouseUp = (e) =>
                @eventMouseMove = ->
                @eventMouseUp = ->
                $element.css
                    width: ''
                    height: ''
                    left: ''
                    top: ''
                $element.removeClass 'dragging'
            @eventMouseMove e   # setup left & top of the element
        result

    # ----------------------------------------
    # public methods
    # ----------------------------------------
    @draggable = ($element, options={}) =>
        ###
        Make the element could be drag.
        @param element: The jQuery element.
        @param options: Options


Response:
mode: 'drag' [default], 'mirror'
        ###
        if options.mode is 'mirror'
            for element in $element
                @data.draggables.push @makeMirrorMode($(element))
        else
            for element in $element
                @data.draggables.push @makeDragMode($(element))
        return

    @removeDraggable = ($element) ->
        $element

    @droppable = ($element, opeions) ->
        ###
        Make the element coulde be drop.
        @param $element: The jQuery element.
        ###
        $element

    # ----------------------------------------
    # factory
    # ----------------------------------------
    data: @data
    draggable: @draggable
    removeDraggable: @removeDraggable
    droppable: @droppable

drag.$inject = ['$injector']
a.factory '$drag', drag


Prompt:
mode: 'drag' [default], 'mirror'
        ###
        if options.mode is 'mirror'
            for element in $element
                @data.draggables.push @makeMirrorMode($(element))
        else
            for element in $element
                @data.draggables.push @makeDragMode($(element))
        return

    @removeDraggable = ($element) ->
        $element

    @droppable = ($element, opeions) ->

Response:
###
        Make the element coulde be drop.
        @param $element: The jQuery element.
        ###
        $element

    # ----------------------------------------
    # factory
    # ----------------------------------------
    data: @data
    draggable: @draggable
    removeDraggable: @removeDraggable
    droppable: @droppable

drag.$inject = ['$injector']
a.factory '$drag', drag


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

  return target

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

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

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

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

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

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


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

  return target

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

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

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

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

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

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

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

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

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

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

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

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

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

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