How to use the sax.SAXStream function in sax

To help you get started, we’ve selected a few sax examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HearthSim / Joust / ts / protocol / HSReplayDecoder.ts View on Github external
opts = opts || {};
		opts.objectMode = true;
		super(opts);

		this.gameId = null;
		this.currentGame = null;
		this.nodeStack = [];
		this.timeOffset = null;
		this.cardIds = Immutable.Map();
		this.mulligans = Immutable.Map();
		this.playerMap = Immutable.Map();
		this.choiceMap = Immutable.Map();
		this.build = null;
		this.debug = false;

		this.sax = new SAXStream(true, {});
		this.sax.on("opentag", this.onOpenTag.bind(this));
		this.sax.on("closetag", this.onCloseTag.bind(this));
		this.sax.on("error", (e: any) => this.emit("error", e));
		this.once("end", () => {
			this.sax.end();
		});
	}

sax

An evented streaming XML parser in JavaScript

ISC
Latest version published 6 months ago

Package Health Score

78 / 100
Full package analysis