Socket
Socket
Sign inDemoInstall

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.4.3 to 1.5.0

lib/writers/BaseWriter.d.ts

26

CHANGELOG.md

@@ -5,2 +5,8 @@ # Change Log

## [1.5.0] - 2020-03-17
- Added JS object and XML string parser to callback API functions.
- Fixed collection functions to return child node indices not descendant node indices.
- Added tree depth to collection function callbacks.
## [1.4.3] - 2020-03-03

@@ -10,2 +16,3 @@

**and** `undefined` values (See [#5](https://github.com/oozcitak/xmlbuilder2/issues/5)).
Without these flags, `null` **and** `undefined` will be silently skipped.

@@ -55,11 +62,12 @@ ## [1.4.2] - 2020-03-02

[1.1.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.0.0...v1.1.0
[1.1.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.0...v1.1.1
[1.1.2]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.1...v1.1.2
[1.2.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.2...v1.2.0
[1.2.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.2.0...v1.2.1
[1.3.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.2.1...v1.3.0
[1.4.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.3.0...v1.4.0
[1.4.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.0...v1.4.1
[1.4.2]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.1...v1.4.2
[1.4.3]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.2...v1.4.3
[1.4.2]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.2.1...v1.3.0
[1.2.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/oozcitak/xmlbuilder2/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.0.0...v1.1.0
[1.5.0]: https://github.com/oozcitak/xmlbuilder2/compare/v1.4.3...v1.5.0

@@ -60,15 +60,15 @@ import { XMLBuilderOptions, XMLBuilder, AttributesObject, ExpandObject, WriterOptions, XMLSerializedValue, DTDOptions, PIObject } from "../interfaces";

/** @inheritdoc */
each(callback: ((node: XMLBuilder, index: number) => void), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder;
each(callback: ((node: XMLBuilder, index: number, level: number) => void), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder;
/** @inheritdoc */
map<T>(callback: ((node: XMLBuilder, index: number) => T), self?: boolean, recursive?: boolean, thisArg?: any): T[];
map<T>(callback: ((node: XMLBuilder, index: number, level: number) => T), self?: boolean, recursive?: boolean, thisArg?: any): T[];
/** @inheritdoc */
reduce<T>(callback: ((value: T, node: XMLBuilder, index: number) => T), initialValue: T, self?: boolean, recursive?: boolean, thisArg?: any): T;
reduce<T>(callback: ((value: T, node: XMLBuilder, index: number, level: number) => T), initialValue: T, self?: boolean, recursive?: boolean, thisArg?: any): T;
/** @inheritdoc */
find(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder | undefined;
find(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder | undefined;
/** @inheritdoc */
filter(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder[];
filter(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder[];
/** @inheritdoc */
every(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
every(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
/** @inheritdoc */
some(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
some(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
/** @inheritdoc */

@@ -84,3 +84,4 @@ toArray(self?: boolean, recursive?: boolean): XMLBuilder[];

* Gets the next descendant of the given node of the tree rooted at `root`
* in depth-first pre-order.
* in depth-first pre-order. Returns a three-tuple with
* [descendant, descendant_index, descendant_level].
*

@@ -95,3 +96,4 @@ * @param root - root node of the tree

* Gets the next descendant of the given node of the tree rooted at `root`
* in depth-first pre-order.
* in depth-first pre-order. Returns a three-tuple with
* [descendant, descendant_index, descendant_level].
*

@@ -102,2 +104,4 @@ * @param root - root node of the tree

* only the immediate child nodes
* @param index - child node index
* @param level - current depth of the XML tree
*/

@@ -104,0 +108,0 @@ private _getNextDescendantNode;

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

const util_2 = require("@oozcitak/dom/lib/util");
const algorithm_1 = require("@oozcitak/dom/lib/algorithm");
/**

@@ -181,2 +182,7 @@ * Represents a wrapper that extends XML nodes to implement easy to use and

[namespace, name] = this._extractNamespace(namespace, name, true);
// inherit namespace from parent
if (namespace === undefined && this._options.inheritNS) {
const [prefix] = algorithm_1.namespace_extractQName(name);
namespace = this.node.lookupNamespaceURI(prefix);
}
// create a child element node

@@ -439,7 +445,6 @@ const childNode = (namespace !== undefined ?

each(callback, self = false, recursive = false, thisArg) {
let node = this._getFirstDescendantNode(this._domNode, self, recursive);
let index = 0;
while (node) {
callback.call(thisArg, new XMLBuilderImpl(node), index++);
node = this._getNextDescendantNode(this._domNode, node, recursive);
let result = this._getFirstDescendantNode(this._domNode, self, recursive);
while (result[0]) {
callback.call(thisArg, new XMLBuilderImpl(result[0]), result[1], result[2]);
result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]);
}

@@ -451,3 +456,3 @@ return this;

let result = [];
this.each((node, index) => result.push(callback.call(thisArg, node, index)), self, recursive);
this.each((node, index, level) => result.push(callback.call(thisArg, node, index, level)), self, recursive);
return result;

@@ -458,3 +463,3 @@ }

let value = initialValue;
this.each((node, index) => value = callback.call(thisArg, value, node, index), self, recursive);
this.each((node, index, level) => value = callback.call(thisArg, value, node, index, level), self, recursive);
return value;

@@ -464,10 +469,9 @@ }

find(predicate, self = false, recursive = false, thisArg) {
let node = this._getFirstDescendantNode(this._domNode, self, recursive);
let index = 0;
while (node) {
const builder = new XMLBuilderImpl(node);
if (predicate.call(thisArg, builder, index++)) {
let result = this._getFirstDescendantNode(this._domNode, self, recursive);
while (result[0]) {
const builder = new XMLBuilderImpl(result[0]);
if (predicate.call(thisArg, builder, result[1], result[2])) {
return builder;
}
node = this._getNextDescendantNode(this._domNode, node, recursive);
result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]);
}

@@ -479,4 +483,4 @@ return undefined;

let result = [];
this.each((node, index) => {
if (predicate.call(thisArg, node, index)) {
this.each((node, index, level) => {
if (predicate.call(thisArg, node, index, level)) {
result.push(node);

@@ -489,10 +493,9 @@ }

every(predicate, self = false, recursive = false, thisArg) {
let node = this._getFirstDescendantNode(this._domNode, self, recursive);
let index = 0;
while (node) {
const builder = new XMLBuilderImpl(node);
if (!predicate.call(thisArg, builder, index++)) {
let result = this._getFirstDescendantNode(this._domNode, self, recursive);
while (result[0]) {
const builder = new XMLBuilderImpl(result[0]);
if (!predicate.call(thisArg, builder, result[1], result[2])) {
return false;
}
node = this._getNextDescendantNode(this._domNode, node, recursive);
result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]);
}

@@ -503,10 +506,9 @@ return true;

some(predicate, self = false, recursive = false, thisArg) {
let node = this._getFirstDescendantNode(this._domNode, self, recursive);
let index = 0;
while (node) {
const builder = new XMLBuilderImpl(node);
if (predicate.call(thisArg, builder, index++)) {
let result = this._getFirstDescendantNode(this._domNode, self, recursive);
while (result[0]) {
const builder = new XMLBuilderImpl(result[0]);
if (predicate.call(thisArg, builder, result[1], result[2])) {
return true;
}
node = this._getNextDescendantNode(this._domNode, node, recursive);
result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]);
}

@@ -518,3 +520,3 @@ return false;

let result = [];
this.each((node) => result.push(node), self, recursive);
this.each(node => result.push(node), self, recursive);
return result;

@@ -548,3 +550,4 @@ }

* Gets the next descendant of the given node of the tree rooted at `root`
* in depth-first pre-order.
* in depth-first pre-order. Returns a three-tuple with
* [descendant, descendant_index, descendant_level].
*

@@ -558,11 +561,12 @@ * @param root - root node of the tree

if (self)
return this._domNode;
return [this._domNode, 0, 0];
else if (recursive)
return this._getNextDescendantNode(root, root, recursive);
return this._getNextDescendantNode(root, root, recursive, 0, 0);
else
return this._domNode.firstChild;
return [this._domNode.firstChild, 0, 1];
}
/**
* Gets the next descendant of the given node of the tree rooted at `root`
* in depth-first pre-order.
* in depth-first pre-order. Returns a three-tuple with
* [descendant, descendant_index, descendant_level].
*

@@ -573,13 +577,15 @@ * @param root - root node of the tree

* only the immediate child nodes
* @param index - child node index
* @param level - current depth of the XML tree
*/
_getNextDescendantNode(root, node, recursive) {
_getNextDescendantNode(root, node, recursive, index, level) {
if (recursive) {
// traverse child nodes
if (node.firstChild)
return node.firstChild;
return [node.firstChild, 0, level + 1];
if (node === root)
return null;
return [null, -1, -1];
// traverse siblings
if (node.nextSibling)
return node.nextSibling;
return [node.nextSibling, index + 1, level];
// traverse parent's next sibling

@@ -589,4 +595,5 @@ let parent = node.parentNode;

if (parent.nextSibling)
return parent.nextSibling;
return [parent.nextSibling, algorithm_1.tree_index(parent.nextSibling), level - 1];
parent = parent.parentNode;
level--;
}

@@ -596,7 +603,7 @@ }

if (root === node)
return node.firstChild;
return [node.firstChild, 0, level + 1];
else
return node.nextSibling;
return [node.nextSibling, index + 1, level];
}
return null;
return [null, -1, -1];
}

@@ -610,15 +617,15 @@ /**

if (writerOptions.format === "xml") {
const writer = new writers_1.StringWriterImpl(this._options);
const writer = new writers_1.StringWriter(this._options);
return writer.serialize(this.node, writerOptions);
}
else if (writerOptions.format === "map") {
const writer = new writers_1.MapWriterImpl(this._options);
const writer = new writers_1.MapWriter(this._options);
return writer.serialize(this.node, writerOptions);
}
else if (writerOptions.format === "object") {
const writer = new writers_1.ObjectWriterImpl(this._options);
const writer = new writers_1.ObjectWriter(this._options);
return writer.serialize(this.node, writerOptions);
}
else if (writerOptions.format === "json") {
const writer = new writers_1.JSONWriterImpl(this._options);
const writer = new writers_1.JSONWriter(this._options);
return writer.serialize(this.node, writerOptions);

@@ -625,0 +632,0 @@ }

@@ -1,2 +0,2 @@

import { XMLBuilderCB, AttributesObject, PIObject, DTDOptions, XMLBuilderCBOptions } from "../interfaces";
import { XMLBuilderCB, AttributesObject, PIObject, DTDOptions, XMLBuilderCBOptions, ExpandObject } from "../interfaces";
/**

@@ -35,3 +35,3 @@ * Represents a readable XML document stream.

/** @inheritdoc */
ele(p1: string | null, p2?: AttributesObject | string, p3?: AttributesObject): XMLBuilderCB;
ele(p1: string | null | ExpandObject, p2?: AttributesObject | string, p3?: AttributesObject): XMLBuilderCB;
/** @inheritdoc */

@@ -38,0 +38,0 @@ att(p1: AttributesObject | string | null, p2?: string, p3?: string): XMLBuilderCB;

@@ -10,2 +10,3 @@ "use strict";

const LocalNameSet_1 = require("@oozcitak/dom/lib/serializer/LocalNameSet");
const util_2 = require("@oozcitak/dom/lib/util");
/**

@@ -49,2 +50,46 @@ * Represents a readable XML document stream.

ele(p1, p2, p3) {
// parse if JS object or XML or JSON string
if (util_1.isObject(p1) || (util_1.isString(p1) && (/^\s*</.test(p1) || /^\s*[\{\[]/.test(p1)))) {
let currentLevel = -1;
__1.fragment(p1).each((child, index, level) => {
if (currentLevel > level) {
while (currentLevel-- > level) {
this.up();
}
}
currentLevel = level;
const node = child.node;
if (util_2.Guard.isElementNode(node)) {
const name = node.prefix ? node.prefix + ":" + node.localName : node.localName;
if (node.namespaceURI !== null) {
this.ele(node.namespaceURI, name);
}
else {
this.ele(name);
}
for (const attr of node.attributes) {
const name = attr.prefix ? attr.prefix + ":" + attr.localName : attr.localName;
if (attr.namespaceURI !== null) {
this.att(attr.namespaceURI, name, attr.value);
}
else {
this.att(name, attr.value);
}
}
}
else if (util_2.Guard.isExclusiveTextNode(node)) {
this.txt(node.data);
}
else if (util_2.Guard.isCommentNode(node)) {
this.com(node.data);
}
else if (util_2.Guard.isCDATASectionNode(node)) {
this.dat(node.data);
}
else if (util_2.Guard.isProcessingInstructionNode(node)) {
this.ins(node.target, node.data);
}
}, false, true);
return this;
}
this._serializeOpenTag(true);

@@ -166,3 +211,8 @@ if (!this._fragment && this._hasDocumentElement && this._level === 0) {

}
this._push(this._beginLine() + "<?" + node.target + " " + node.data + "?>");
if (node.data) {
this._push(this._beginLine() + "<?" + node.target + " " + node.data + "?>");
}
else {
this._push(this._beginLine() + "<?" + node.target + "?>");
}
return this;

@@ -169,0 +219,0 @@ }

@@ -11,51 +11,2 @@ import { Node, Document } from "@oozcitak/dom/lib/dom/interfaces";

*/
export interface XMLBuilderCreateOptions {
/**
* A version number string, always `"1.0"`.
*/
version?: "1.0";
/**
* Encoding declaration, e.g. `"UTF-8"`. No default.
*/
encoding?: string;
/**
* Standalone document declaration: `true` or `false`. No default.
*/
standalone?: boolean;
/**
* Whether nodes with `null` or `undefined` values will be kept or ignored.
* Defaults to `false`.
*/
keepNullNodes?: boolean;
/**
* Whether attributes with `null` or `undefined` values will be kept or
* ignored. Defaults to `false`.
*/
keepNullAttributes?: boolean;
/**
* Whether converter strings will be ignored when converting JS
* objects to nodes. Defaults to `false`.
*/
ignoreConverters?: boolean;
/**
* Defines string keys used while converting JS objects to nodes.
*/
convert?: Partial<ConvertOptions>;
/**
* Defines default namespaces to apply to all elements and attributes.
*/
defaultNamespace?: {
ele?: null | string;
att?: null | string;
};
/**
* Defines namespace aliases.
*/
namespaceAlias?: {
[key: string]: string | null;
};
}
/**
* Defines the options used while creating an XML document.
*/
export interface XMLBuilderOptions {

@@ -102,6 +53,47 @@ /**

namespaceAlias: {
/**
* HTML namespace
*/
html: "http://www.w3.org/1999/xhtml";
/**
* XML namespace
*/
xml: "http://www.w3.org/XML/1998/namespace";
/**
* XMLNS namespace
*/
xmlns: "http://www.w3.org/2000/xmlns/";
/**
* MathML namespace
*/
mathml: "http://www.w3.org/1998/Math/MathML";
/**
* SVG namespace
*/
svg: "http://www.w3.org/2000/svg";
/**
* XLink namespace
*/
xlink: "http://www.w3.org/1999/xlink";
/**
* User supplied namespace alias
*/
[key: string]: string | null;
};
/**
* Whether child element nodes will inherit their parent element's namespace.
* Defaults to `false`.
*/
inheritNS: boolean;
}
/**
* Defines the options used while creating an XML document.
*/
export interface XMLBuilderCreateOptions extends RecursivePartial<XMLBuilderOptions> {
}
/**
* Defines default values for builder options.
*/
export declare const DefaultBuilderOptions: XMLBuilderOptions;
/**
* Contains keys of `XMLBuilderOptions`.

@@ -242,9 +234,5 @@ */

/**
* Defines default values for builder options.
*/
export declare const DefaultBuilderOptions: Partial<XMLBuilderOptions>;
/**
* Defines the options passed to the writer.
*/
declare type BaseWriterOptions = {
export declare type BaseWriterOptions = {
/**

@@ -659,4 +647,4 @@ * Output format. Defaults to `"xml"`.

/**
* Traverses through the child nodes of a node. `callback` is called with two
* arguments: `(node, index)`.
* Traverses through the child nodes of a node. `callback` is called with three
* arguments: `(node, index, level)`.
*

@@ -669,6 +657,7 @@ * @param callback - a callback function to apply to each child node

*/
each(callback: ((node: XMLBuilder, index: number) => void), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder;
each(callback: ((node: XMLBuilder, index: number, level: number) => void), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder;
/**
* Produces an array of values by transforming each child node with the given
* callback function. `callback` is called with two arguments: `(node, index)`.
* callback function. `callback` is called with three arguments:
* `(node, index, level)`.
*

@@ -681,6 +670,7 @@ * @param callback - a callback function to apply to each child node

*/
map<T>(callback: ((node: XMLBuilder, index: number) => T), self?: boolean, recursive?: boolean, thisArg?: any): T[];
map<T>(callback: ((node: XMLBuilder, index: number, level: number) => T), self?: boolean, recursive?: boolean, thisArg?: any): T[];
/**
* Reduces child nodes into a single value by applying the given callback
* function. `callback` is called with three arguments: `(value, node, index)`.
* function. `callback` is called with four arguments:
* `(value, node, index, level)`.
*

@@ -694,6 +684,6 @@ * @param callback - a callback function to apply to each child node

*/
reduce<T>(callback: ((value: T, node: XMLBuilder, index: number) => T), initialValue: T, self?: boolean, recursive?: boolean, thisArg?: any): T;
reduce<T>(callback: ((value: T, node: XMLBuilder, index: number, level: number) => T), initialValue: T, self?: boolean, recursive?: boolean, thisArg?: any): T;
/**
* Returns the first child node satisfying the given predicate. `predicate` is
* called with two arguments: `(node, index)`.
* called with three arguments: `(node, index, level)`.
*

@@ -706,6 +696,6 @@ * @param predicate - a callback function to apply to each child node

*/
find(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder | undefined;
find(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder | undefined;
/**
* Produces an array of child nodes which pass the given predicate test.
* `predicate` is called with two arguments: `(node, index)`.
* `predicate` is called with three arguments: `(node, index, level)`.
*

@@ -718,6 +708,6 @@ * @param predicate - a callback function to apply to each child node

*/
filter(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder[];
filter(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): XMLBuilder[];
/**
* Returns `true` if all child nodes pass the given predicate test.
* `predicate` is called with two arguments: `(node, index)`.
* `predicate` is called with three arguments: `(node, index, level)`.
*

@@ -730,6 +720,6 @@ * @param predicate - a callback function to apply to each child node

*/
every(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
every(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
/**
* Returns `true` if any of the child nodes pass the given predicate test.
* `predicate` is called with two arguments: `(node, index)`.
* `predicate` is called with three arguments: `(node, index, level)`.
*

@@ -742,3 +732,3 @@ * @param predicate - a callback function to apply to each child node

*/
some(predicate: ((node: XMLBuilder, index: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
some(predicate: ((node: XMLBuilder, index: number, level: number) => boolean), self?: boolean, recursive?: boolean, thisArg?: any): boolean;
/**

@@ -795,2 +785,11 @@ * Produces an array of child nodes.

/**
* Creates new element nodes from the given JS object and appends it to the
* list of child nodes.
*
* @param obj - a JS object representing nodes to insert
*
* @returns the last top level element node created
*/
ele(obj: ExpandObject): XMLBuilderCB;
/**
* Creates or updates an element attribute.

@@ -986,2 +985,5 @@ *

export declare const DefaultXMLBuilderCBOptions: Partial<XMLBuilderCBOptions>;
declare type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
};
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Contains keys of `XMLBuilderOptions`.
*/
exports.XMLBuilderOptionKeys = new Set([
"version", "encoding", "standalone", "keepNullNodes", "keepNullAttributes",
"ignoreConverters", "convert", "defaultNamespace", "namespaceAlias"
]);
/**
* Defines default values for builder options.

@@ -15,2 +8,4 @@ */

version: "1.0",
encoding: undefined,
standalone: undefined,
keepNullNodes: false,

@@ -37,5 +32,10 @@ keepNullAttributes: false,

xlink: "http://www.w3.org/1999/xlink"
}
},
inheritNS: false
};
/**
* Contains keys of `XMLBuilderOptions`.
*/
exports.XMLBuilderOptionKeys = new Set(Object.keys(exports.DefaultBuilderOptions));
/**
* Defines default values for builder options.

@@ -42,0 +42,0 @@ */

@@ -1,4 +0,4 @@

export { MapWriterImpl } from './MapWriterImpl';
export { StringWriterImpl } from './StringWriterImpl';
export { ObjectWriterImpl } from './ObjectWriterImpl';
export { JSONWriterImpl } from './JSONWriterImpl';
export { MapWriter } from './MapWriter';
export { StringWriter } from './StringWriter';
export { ObjectWriter } from './ObjectWriter';
export { JSONWriter } from './JSONWriter';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MapWriterImpl_1 = require("./MapWriterImpl");
exports.MapWriterImpl = MapWriterImpl_1.MapWriterImpl;
var StringWriterImpl_1 = require("./StringWriterImpl");
exports.StringWriterImpl = StringWriterImpl_1.StringWriterImpl;
var ObjectWriterImpl_1 = require("./ObjectWriterImpl");
exports.ObjectWriterImpl = ObjectWriterImpl_1.ObjectWriterImpl;
var JSONWriterImpl_1 = require("./JSONWriterImpl");
exports.JSONWriterImpl = JSONWriterImpl_1.JSONWriterImpl;
var MapWriter_1 = require("./MapWriter");
exports.MapWriter = MapWriter_1.MapWriter;
var StringWriter_1 = require("./StringWriter");
exports.StringWriter = StringWriter_1.StringWriter;
var ObjectWriter_1 = require("./ObjectWriter");
exports.ObjectWriter = ObjectWriter_1.ObjectWriter;
var JSONWriter_1 = require("./JSONWriter");
exports.JSONWriter = JSONWriter_1.JSONWriter;
//# sourceMappingURL=index.js.map
{
"name": "xmlbuilder2",
"version": "1.4.3",
"version": "1.5.0",
"keywords": [

@@ -30,3 +30,3 @@ "xml",

"@oozcitak/util": "8.3.1",
"@oozcitak/dom": "1.15.2",
"@oozcitak/dom": "1.15.4",
"@oozcitak/infra": "1.0.5"

@@ -70,4 +70,5 @@ },

"prepare": "npm run test",
"postpublish": "git push --all && git push --tags"
"postpublish": "git push --all && git push --tags",
"servedocs": "(cd docs && bundle exec jekyll serve)"
}
}

@@ -165,3 +165,3 @@ # xmlbuilder2

See the [wiki](https://github.com/oozcitak/xmlbuilder2/wiki) for details.
See: https://oozcitak.github.io/xmlbuilder2/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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