🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

stream-xml

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-xml - npm Package Compare versions

Comparing version

to
0.3.0

14

dist/parser.js

@@ -18,2 +18,11 @@ "use strict";

const isWhitespace = (char) => char === BLANK || char === TAB || char === RETURN || char === NEWLINE;
/**
* Checks if two Uint8Arrays are equal
*/
const isEqual = (a, b) => {
if (a.length !== b.length) {
return false;
}
return a.every((d, i) => d === b[i]);
};
var StateType;

@@ -44,2 +53,3 @@ (function (StateType) {

#textDecoder;
#textEncoder = new TextEncoder();
/**

@@ -70,3 +80,3 @@ * Create a new Parser.

this.#callbacks.push({
tagName: Buffer.from(tagName),
tagName: this.#textEncoder.encode(tagName),
enter,

@@ -306,3 +316,3 @@ exit,

for (const cb of this.#callbacks) {
if (Buffer.compare(this.#buffer.subarray(nameStart, nameEnd), cb.tagName) === 0) {
if (isEqual(this.#buffer.subarray(nameStart, nameEnd), cb.tagName)) {
if (enter) {

@@ -309,0 +319,0 @@ cb.enter();

2

package.json

@@ -8,3 +8,3 @@ {

},
"version": "0.2.1",
"version": "0.3.0",
"main": "dist/index.js",

@@ -11,0 +11,0 @@ "license": "MIT",