@thi.ng/hiccup-html-parse 0.3.104 → 0.3.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +4 -3
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
10
+ > This is one of 212 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/index.js CHANGED
@@ -81,7 +81,7 @@ const __transformScope = defmulti(
81
81
  if (opts.doctype && children?.[0]) {
82
82
  acc.push(["!DOCTYPE", children[0].result]);
83
83
  }
84
- for (let x of children[1].children)
84
+ for (const x of children[1].children)
85
85
  __transformScope(x, opts, acc);
86
86
  },
87
87
  node: ({ children }, opts, acc) => {
@@ -98,7 +98,7 @@ const __transformScope = defmulti(
98
98
  const attribs = {};
99
99
  const el = [name.result, attribs];
100
100
  if ($attribs) {
101
- for (let a of $attribs) {
101
+ for (const a of $attribs) {
102
102
  const name2 = a.children[0].result;
103
103
  if (opts.dataAttribs === false && name2.startsWith("data-"))
104
104
  continue;
@@ -115,7 +115,8 @@ const __transformScope = defmulti(
115
115
  if (body.result) {
116
116
  el.push(body.result.trim());
117
117
  } else if (body.children) {
118
- for (let x of body.children) __transformScope(x, opts, el);
118
+ for (const x of body.children)
119
+ __transformScope(x, opts, el);
119
120
  }
120
121
  }
121
122
  const result = opts.tx ? opts.tx(el) : el;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-html-parse",
3
- "version": "0.3.104",
3
+ "version": "0.3.106",
4
4
  "description": "Well-formed HTML parsing and customizable transformation to nested JS arrays in @thi.ng/hiccup format",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,10 +39,10 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.12.9",
43
- "@thi.ng/defmulti": "^3.0.85",
44
- "@thi.ng/parse": "^2.6.38",
45
- "@thi.ng/strings": "^3.9.30"
42
+ "@thi.ng/api": "^8.12.11",
43
+ "@thi.ng/defmulti": "^3.0.87",
44
+ "@thi.ng/parse": "^2.6.40",
45
+ "@thi.ng/strings": "^3.9.32"
46
46
  },
47
47
  "devDependencies": {
48
48
  "esbuild": "^0.27.0",
@@ -88,5 +88,5 @@
88
88
  "status": "alpha",
89
89
  "year": 2023
90
90
  },
91
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
91
+ "gitHead": "e7a21b9d2a188fa04d4c893d8531c40fbc0f4c06\n"
92
92
  }