New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sax-wasm

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sax-wasm - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

15

lib/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./saxWasm"), exports);
__export(require("./saxWasm"));
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SAXParser = exports.Tag = exports.Text = exports.ProcInst = exports.Attribute = exports.AttributeType = exports.Position = exports.Reader = exports.SaxEventType = void 0;
class SaxEventType {

@@ -186,3 +185,3 @@ }

this.eventTrap = (event, ptr, len) => {
const uint8array = new Uint8Array(this.wasmSaxParser.memory.buffer, ptr, len);
const uint8array = new Uint8Array(this.wasmSaxParser.memory.buffer, ptr, len).slice();
let detail;

@@ -225,4 +224,3 @@ switch (event) {

}
},
configurable: false, enumerable: true
}, configurable: false, enumerable: true
}

@@ -244,3 +242,3 @@ });

}
this.writeBuffer.set(chunk);
this.writeBuffer.set(chunk, 0);
write(0, chunk.byteLength);

@@ -247,0 +245,0 @@ }

{
"name": "sax-wasm",
"version": "2.1.1",
"version": "2.1.2",
"repository": "https://github.com/justinwilaby/sax-wasm",

@@ -40,6 +40,6 @@ "description": "An extremely fast JSX, HTML and XML parser written in Rust compiled to WebAssembly for Node and the Web",

"ltx": "^2.9.2",
"mocha": "^6.2.0",
"node-expat": "^2.3.18",
"mocha": "^9.2.0",
"node-expat": "^2.4.0",
"node-xml": "^1.0.2",
"nyc": "^15.0.0",
"nyc": "^15.1.0",
"sax": "^1.2.4",

@@ -46,0 +46,0 @@ "source-map-support": "^0.5.13",

@@ -18,6 +18,6 @@ # SAX (Simple API for XML) for WebAssembly

## Benchmarks (Node v14.13.0 / 2.7 GHz Quad-Core Intel Core i7)
All parsers are tested using a large XML document (2.1 MB) containing a variety of elements and is streamed when supported
by the parser. This attempts to recreate the best real-world use case for parsing XML. Other libraries test benchmarks using a
very small XML fragment such as `<foo bar="baz">quux</foo>` which does not hit all code branches responsible for processing the
## Benchmarks (Node v16.14.0 / 2.7 GHz Quad-Core Intel Core i7)
All parsers are tested using a large XML document (2.1 MB) containing a variety of elements and is streamed when supported
by the parser. This attempts to recreate the best real-world use case for parsing XML. Other libraries test benchmarks using a
very small XML fragment such as `<foo bar="baz">quux</foo>` which does not hit all code branches responsible for processing the
document and heavily skews the results in their favor.

@@ -27,7 +27,7 @@

|--------------------------------------------------------------------------------------------|--------------------------:|:------:|:---------------:|
| [sax-wasm](https://github.com/justinwilaby/sax-wasm) | 95.08 | ☑ | ☑ |
| [sax-js](https://github.com/isaacs/sax-js) | 167.33 | ☑ | ☑* |
| [node-expat](https://github.com/node-xmpp/node-expat) | 242.82 | ☐ | ☐ |
| [libxmljs](https://github.com/polotek/libxmljs) | 287.00 | ☐ | ☐ |
| [node-xml](https://github.com/dylang/node-xml) | 621.26 | ☑ | ☐ |
| [sax-wasm](https://github.com/justinwilaby/sax-wasm) | 64.16 | ☑ | ☑ |
| [sax-js](https://github.com/isaacs/sax-js) | 155.77 | ☑ | ☑* |
| [node-expat](https://github.com/node-xmpp/node-expat) | 234.78 | ☐ | ☐ |
| [libxmljs](https://github.com/polotek/libxmljs) | 274.95 | ☐ | ☐ |
| [node-xml](https://github.com/dylang/node-xml) | 685.00 | ☑ | ☐ |
<sub>*built for node but *should* run in the browser</sub>

@@ -34,0 +34,0 @@

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