Socket
Socket
Sign inDemoInstall

@aws-sdk/xml-builder

Package Overview
Dependencies
Maintainers
5
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/xml-builder - npm Package Compare versions

Comparing version 3.186.0 to 3.188.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
**Note:** Version bump only for package @aws-sdk/xml-builder
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)

@@ -8,0 +16,0 @@

63

dist-es/XmlNode.js

@@ -1,7 +0,5 @@

import { __values } from "tslib";
import { escapeAttribute } from "./escape-attribute";
import { XmlText } from "./XmlText";
var XmlNode = (function () {
function XmlNode(name, children) {
if (children === void 0) { children = []; }
export class XmlNode {
constructor(name, children = []) {
this.name = name;

@@ -11,4 +9,4 @@ this.children = children;

}
XmlNode.of = function (name, childText, withName) {
var node = new XmlNode(name);
static of(name, childText, withName) {
const node = new XmlNode(name);
if (childText !== undefined) {

@@ -21,44 +19,31 @@ node.addChildNode(new XmlText(childText));

return node;
};
XmlNode.prototype.withName = function (name) {
}
withName(name) {
this.name = name;
return this;
};
XmlNode.prototype.addAttribute = function (name, value) {
}
addAttribute(name, value) {
this.attributes[name] = value;
return this;
};
XmlNode.prototype.addChildNode = function (child) {
}
addChildNode(child) {
this.children.push(child);
return this;
};
XmlNode.prototype.removeAttribute = function (name) {
}
removeAttribute(name) {
delete this.attributes[name];
return this;
};
XmlNode.prototype.toString = function () {
var e_1, _a;
var hasChildren = Boolean(this.children.length);
var xmlText = "<".concat(this.name);
var attributes = this.attributes;
try {
for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var attributeName = _c.value;
var attribute = attributes[attributeName];
if (typeof attribute !== "undefined" && attribute !== null) {
xmlText += " ".concat(attributeName, "=\"").concat(escapeAttribute("" + attribute), "\"");
}
}
toString() {
const hasChildren = Boolean(this.children.length);
let xmlText = `<${this.name}`;
const attributes = this.attributes;
for (const attributeName of Object.keys(attributes)) {
const attribute = attributes[attributeName];
if (typeof attribute !== "undefined" && attribute !== null) {
xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return (xmlText += !hasChildren ? "/>" : ">".concat(this.children.map(function (c) { return c.toString(); }).join(""), "</").concat(this.name, ">"));
};
return XmlNode;
}());
export { XmlNode };
return (xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}</${this.name}>`);
}
}
import { escapeElement } from "./escape-element";
var XmlText = (function () {
function XmlText(value) {
export class XmlText {
constructor(value) {
this.value = value;
}
XmlText.prototype.toString = function () {
toString() {
return escapeElement("" + this.value);
};
return XmlText;
}());
export { XmlText };
}
}
{
"name": "@aws-sdk/xml-builder",
"version": "3.186.0",
"version": "3.188.0",
"description": "XML builder for the AWS SDK",

@@ -5,0 +5,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc