Newer
Older
CVSS_3.0_GUI / node_modules / nwjs-builder-phoenix / node_modules / plist / node_modules / xmlbuilder / lib / XMLAttribute.js
root on 7 May 2019 872 bytes Initial commit
  1. // Generated by CoffeeScript 1.10.0
  2. (function() {
  3. var XMLAttribute;
  4.  
  5. module.exports = XMLAttribute = (function() {
  6. function XMLAttribute(parent, name, value) {
  7. this.options = parent.options;
  8. this.stringify = parent.stringify;
  9. if (name == null) {
  10. throw new Error("Missing attribute name of element " + parent.name);
  11. }
  12. if (value == null) {
  13. throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name);
  14. }
  15. this.name = this.stringify.attName(name);
  16. this.value = this.stringify.attValue(value);
  17. }
  18.  
  19. XMLAttribute.prototype.clone = function() {
  20. return Object.create(this);
  21. };
  22.  
  23. XMLAttribute.prototype.toString = function(options) {
  24. return this.options.writer.set(options).attribute(this);
  25. };
  26.  
  27. return XMLAttribute;
  28.  
  29. })();
  30.  
  31. }).call(this);
Buy Me A Coffee