Socket
Socket
Sign inDemoInstall

stream-xml

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc