Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sax-wasm

Package Overview
Dependencies
Maintainers
1
Versions
37
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 1.4.2 to 1.4.3

10

package.json
{
"name": "sax-wasm",
"version": "1.4.2",
"version": "1.4.3",
"repository": "https://github.com/justinwilaby/sax-wasm",

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

"bindgen": "wasm-bindgen lib/sax-wasm.wasm --out-dir lib/ --remove-name-section --no-typescript --out-name sax-wasm.wasm",
"build": "tsc && npm run build:wasm && npm run bindgen"
"build": "tsc && npm run build:wasm && npm run bindgen",
"benchmark": "node src/js/__test__/benchmark.js"
},

@@ -38,4 +39,9 @@ "keywords": [

"expect.js": "^0.3.1",
"libxmljs": "^0.19.7",
"ltx": "^2.9.2",
"mocha": "^6.2.0",
"node-expat": "^2.3.18",
"node-xml": "^1.0.2",
"nyc": "^14.1.1",
"sax": "^1.2.4",
"source-map-support": "^0.5.13",

@@ -42,0 +48,0 @@ "ts-node": "^8.3.0",

16

README.md

@@ -11,3 +11,3 @@ # SAX (Simple API for XML) for WebAssembly

Sax Wasm is a sax style parser for XML, HTML and JSX written in [Rust](https://www.rust-lang.org/en-US/), compiled for
WebAssembly with the sole motivation to bring **near native speeds** to XML and JSX parsing for node and the web.
WebAssembly with the sole motivation to bring **faster than native speeds** to XML and JSX parsing for node and the web.
Inspired by [sax js](https://github.com/isaacs/sax-js) and rebuilt with Rust for WebAssembly, sax-wasm brings optimizations

@@ -19,3 +19,17 @@ for speed and support for JSX syntax.

## Benchmarks (Node v13.3.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.
| Parser with Advanced Features | time/ms (lower is better) | JS | Runs in browser |
|--------------------------------------------------------------------------------------------|--------------------------:|:------:|:---------------:|
| [sax-wasm](https://github.com/justinwilaby/sax-wasm) | 147.07 | ☑ | ☑ |
| [sax-js](https://github.com/isaacs/sax-js) | 164.99 | ☑ | ☑* |
| [node-expat](https://github.com/node-xmpp/node-expat) | 251.09 | ☐ | ☐ |
| [libxmljs](https://github.com/polotek/libxmljs) | 288.65 | ☐ | ☐ |
| [node-xml](https://github.com/dylang/node-xml) | 615.13 | ☑ | ☐ |
<sub>*built for node but *should* run in the browser</sub>
## Installation

@@ -22,0 +36,0 @@ ```bash

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