Newer
Older
CVSS_3.0_GUI / dist / CVSS_3.0_Calc-1.0.0-linux-x64 / node_modules / nwjs-builder-phoenix / node_modules / plist / node_modules / xmlbuilder / lib / XMLProcessingInstruction.js
root on 7 May 2019 1 KB Initial commit
  1. // Generated by CoffeeScript 1.10.0
  2. (function() {
  3. var XMLNode, XMLProcessingInstruction,
  4. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  5. hasProp = {}.hasOwnProperty;
  6.  
  7. XMLNode = require('./XMLNode');
  8.  
  9. module.exports = XMLProcessingInstruction = (function(superClass) {
  10. extend(XMLProcessingInstruction, superClass);
  11.  
  12. function XMLProcessingInstruction(parent, target, value) {
  13. XMLProcessingInstruction.__super__.constructor.call(this, parent);
  14. if (target == null) {
  15. throw new Error("Missing instruction target");
  16. }
  17. this.target = this.stringify.insTarget(target);
  18. if (value) {
  19. this.value = this.stringify.insValue(value);
  20. }
  21. }
  22.  
  23. XMLProcessingInstruction.prototype.clone = function() {
  24. return Object.create(this);
  25. };
  26.  
  27. XMLProcessingInstruction.prototype.toString = function(options) {
  28. return this.options.writer.set(options).processingInstruction(this);
  29. };
  30.  
  31. return XMLProcessingInstruction;
  32.  
  33. })(XMLNode);
  34.  
  35. }).call(this);
Buy Me A Coffee