Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xmlbuilder2

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmlbuilder2 - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

CHANGELOG.md

16

lib/builder/interfaces.d.ts

@@ -44,4 +44,4 @@ import { Node, Document } from "@oozcitak/dom/lib/dom/interfaces";

/**
* Defines default namespaces to apply to all elements and attributes.
*/
* Defines default namespaces to apply to all elements and attributes.
*/
defaultNamespace?: {

@@ -51,2 +51,8 @@ ele?: null | string;

};
/**
* Defines namespace aliases.
*/
namespaceAlias?: {
[key: string]: string | null;
};
}

@@ -93,2 +99,8 @@ /**

};
/**
* Defines namespace aliases.
*/
namespaceAlias: {
[key: string]: string | null;
};
}

@@ -95,0 +107,0 @@ /**

@@ -8,3 +8,3 @@ "use strict";

"version", "encoding", "standalone", "keepNullNodes", "keepNullAttributes",
"ignoreConverters", "convert", "defaultNamespace"
"ignoreConverters", "convert", "defaultNamespace", "namespaceAlias"
]);

@@ -29,4 +29,12 @@ /**

att: undefined
},
namespaceAlias: {
html: "http://www.w3.org/1999/xhtml",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/",
mathml: "http://www.w3.org/1998/Math/MathML",
svg: "http://www.w3.org/2000/svg",
xlink: "http://www.w3.org/1999/xlink"
}
};
//# sourceMappingURL=interfaces.js.map

@@ -638,6 +638,14 @@ "use strict";

}
// look-up default namespace
if (namespace === undefined) {
// look-up default namespace
namespace = (ele ? this._options.defaultNamespace.ele : this._options.defaultNamespace.att);
}
else if (namespace !== null && namespace[0] === "@") {
// look-up namespace aliases
const alias = namespace.slice(1);
namespace = this._options.namespaceAlias[alias];
if (namespace === undefined) {
throw new Error("Namespace alias `" + alias + "` is not defined. " + this._debugInfo());
}
}
return [namespace, name];

@@ -657,3 +665,3 @@ }

if (!docNode)
throw new Error("Owner document is null");
throw new Error("Owner document is null. " + this._debugInfo());
return docNode;

@@ -660,0 +668,0 @@ }

2

package.json
{
"name": "xmlbuilder2",
"version": "1.2.1",
"version": "1.3.0",
"keywords": [

@@ -5,0 +5,0 @@ "xml",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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