Socket
Socket
Sign inDemoInstall

xmlbuilder

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmlbuilder - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

14

lib/XMLFragment.js

@@ -49,3 +49,3 @@ (function() {

var child, i, key, val, _ref, _ref2;
if (this.isRoot) {
if (this.isRoot || this.isDoc) {
throw new Error("Cannot insert elements at root level");

@@ -87,3 +87,3 @@ }

var child, i, key, val, _ref, _ref2;
if (this.isRoot) {
if (this.isRoot || this.isDoc) {
throw new Error("Cannot insert elements at root level");

@@ -125,3 +125,3 @@ }

var i, _ref;
if (this.isRoot) {
if (this.isRoot || this.isDoc) {
throw new Error("Cannot remove the root element");

@@ -185,4 +185,4 @@ }

XMLFragment.prototype.up = function() {
if (!(this.parent != null)) {
throw new Error("This node has no parent");
if (this.isRoot) {
throw new Error("This node has no parent. Use doc() if you need to get the document object.");
}

@@ -215,3 +215,3 @@ return this.parent;

var i;
if (this.isRoot) {
if (this.isRoot || this.isDoc) {
throw new Error("Root node has no siblings");

@@ -227,3 +227,3 @@ }

var i;
if (this.isRoot) {
if (this.isRoot || this.isDoc) {
throw new Error("Root node has no siblings");

@@ -230,0 +230,0 @@ }

{
"name": "xmlbuilder",
"version": "0.3.0",
"version": "0.3.1",
"keywords": "xml xmlbuilder",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/oozcitak/xmlbuilder-js",

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