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.1.5 to 1.1.6

8

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

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

"test:coveralls": "npm run test && nyc report --reporter=text-lcov | coveralls",
"build:wasm": "rustc ./src/main.rs -C lto -O --target wasm32-unknown-unknown -o ./lib/sax-wasm.wasm",
"run:wasm-gc": "cd ./lib && wasm-gc sax-wasm.wasm",
"build": "tsc && npm run build:wasm && npm run run:wasm-gc"
"build:wasm": "rustc ./src/lib.rs -Clto -O --crate-type cdylib --target wasm32-unknown-unknown -o ./lib/sax-wasm.wasm",
"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"
},

@@ -22,0 +22,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# SAX (Simple API for XML) for Web Assembly
# SAX (Simple API for XML) for WebAssembly

@@ -11,4 +11,4 @@ [![Build Status](https://travis-ci.org/justinwilaby/sax-wasm.svg?branch=master)](https://travis-ci.org/justinwilaby/sax-wasm)

Sax Wasm is a sax style parser for XML, HTML and JSX written in [Rust](https://www.rust-lang.org/en-US/), compiled for
Web Assembly with the sole motivation to bring **near 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 Web Assembly, sax-wasm brings optimizations
WebAssembly with the sole motivation to bring **near 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
for speed and support for JSX syntax.

@@ -29,3 +29,3 @@

// Get the path to the Web Assembly binary and load it
// Get the path to the WebAssembly binary and load it
const saxPath = require.resolve('sax-wasm/lib/sax-wasm.wasm');

@@ -112,3 +112,3 @@ const saxWasmBuffer = fs.readFileSync(saxPath);

|----------------------------------|--------------|---------------------------------------------|
|SaxEventType.Text |0b000000000001|text: [Text](src/js/saxWasm.ts#L46) |
|SaxEventType.Text |0b000000000001|text: [Text](src/js/saxWasm.ts#L42) |
|SaxEventType.ProcessingInstruction|0b000000000010|procInst: string |

@@ -118,9 +118,9 @@ |SaxEventType.SGMLDeclaration |0b000000000100|sgmlDecl: string |

|SaxEventType.Comment |0b000000010000|comment: string |
|SaxEventType.OpenTagStart |0b000000100000|tag: [Tag](src/js/saxWasm.ts#L52) |
|SaxEventType.Attribute |0b000001000000|attribute: [Attribute](src/js/saxWasm.ts#L37)|
|SaxEventType.OpenTag |0b000010000000|tag: [Tag](src/js/saxWasm.ts#L52) |
|SaxEventType.CloseTag |0b000100000000|tag: [Tag](src/js/saxWasm.ts#L52) |
|SaxEventType.OpenCDATA |0b001000000000|start: [Position](src/js/saxWasm.ts#L32) |
|SaxEventType.OpenTagStart |0b000000100000|tag: [Tag](src/js/saxWasm.ts#L48) |
|SaxEventType.Attribute |0b000001000000|attribute: [Attribute](src/js/saxWasm.ts#L33)|
|SaxEventType.OpenTag |0b000010000000|tag: [Tag](src/js/saxWasm.ts#L48) |
|SaxEventType.CloseTag |0b000100000000|tag: [Tag](src/js/saxWasm.ts#L48) |
|SaxEventType.OpenCDATA |0b001000000000|start: [Position](src/js/saxWasm.ts#L28) |
|SaxEventType.CDATA |0b010000000000|cdata: string |
|SaxEventType.CloseCDATA |0b100000000000|end: [Position](src/js/saxWasm.ts#L32) |
|SaxEventType.CloseCDATA |0b100000000000|end: [Position](src/js/saxWasm.ts#L28) |

@@ -141,3 +141,3 @@ ## SAXParser.js

- `eventHandlder` - A function reference used for event handling. The supplied function must have a signature that accepts
- `eventHandler` - A function reference used for event handling. The supplied function must have a signature that accepts
2 arguments: 1. The `event` which is one of the `SaxEventTypes` and the `body` (listed in the table above)

@@ -177,3 +177,6 @@

```
Follow the instructions to install [wasm-gc](https://github.com/alexcrichton/wasm-gc) based on your platform.
Install the wasm-bindgen-cli tool
```bash
cargo install wasm-bindgen-cli
```
The project can now be built using:

@@ -180,0 +183,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