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

@thi.ng/sax

Package Overview
Dependencies
Maintainers
1
Versions
283
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/sax - npm Package Compare versions

Comparing version 2.1.105 to 2.1.106

2

CHANGELOG.md
# Change Log
- **Last updated**: 2024-03-01T15:22:50Z
- **Last updated**: 2024-03-02T14:05:53Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -5,0 +5,0 @@

{
"name": "@thi.ng/sax",
"version": "2.1.105",
"version": "2.1.106",
"description": "Transducer-based, SAX-like, non-validating, speedy & tiny XML parser",

@@ -39,5 +39,5 @@ "type": "module",

"@thi.ng/api": "^8.9.27",
"@thi.ng/strings": "^3.7.19",
"@thi.ng/transducers": "^8.9.8",
"@thi.ng/transducers-fsm": "^2.2.71"
"@thi.ng/strings": "^3.7.20",
"@thi.ng/transducers": "^8.9.9",
"@thi.ng/transducers-fsm": "^2.2.72"
},

@@ -84,3 +84,3 @@ "devDependencies": {

},
"gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
"gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
}

@@ -184,2 +184,5 @@ <!-- This file is generated - DO NOT EDIT! -->

```ts
import { parse, Type } from "@thi.ng/sax";
import * as tx from "@thi.ng/transducers";
svg=`

@@ -203,5 +206,5 @@ <?xml version="1.0"?>

// transform into parse events (see parser options below)
sax.parse({ children: true }),
parse({ children: true }),
// match 1st group end
tx.matchFirst((e) => e.type == sax.Type.ELEM_END && e.tag == "g"),
tx.matchFirst((e) => e.type == Type.ELEM_END && e.tag == "g"),
// extract group's children

@@ -234,2 +237,4 @@ tx.mapcat((e) => e.children),

import { defmulti, DEFAULT } from "@thi.ng/defmulti";
import { parse } from "@thi.ng/sax";
import * as tx from "@thi.ng/transducers";

@@ -278,3 +283,3 @@ // coerces given attribute IDs into numeric values and

// this also contains all children (by default)
parseElement(tx.transduce(sax.parse(), tx.last(), svg));
parseElement(tx.transduce(parse(), tx.last(), svg));

@@ -322,6 +327,9 @@ // ["svg",

```ts
[...tx.iterator(sax.parse(), `a`)]
import { parse } from "@thi.ng/sax";
import { iterator } from "@thi.ng/transducers";
[...iterator(parse(), `a`)]
// [ { type: 7, body: 'unexpected char: \'a\' @ pos 1' } ]
[...tx.iterator(sax.parse(), `<a><b></c></a>`)]
[...iterator(parse(), `<a><b></c></a>`)]
// [ { type: 4, tag: 'a', attribs: {} },

@@ -328,0 +336,0 @@ // { type: 4, tag: 'b', attribs: {} },

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