@thi.ng/hiccup 5.3.32 → 5.3.34

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.
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/attribs.js CHANGED
@@ -8,7 +8,7 @@ const mergeClasses = (existing, val) => {
8
8
  if (isArray(val)) val = val.join(" ");
9
9
  if (isString(val)) return $existing ? $existing + " " + val : val;
10
10
  const classes = new Set($existing ? $existing.split(" ") : void 0);
11
- for (let id in val) {
11
+ for (const id in val) {
12
12
  deref(val[id]) ? classes.add(id) : classes.delete(id);
13
13
  }
14
14
  return [...classes].join(" ");
package/css.js CHANGED
@@ -3,7 +3,7 @@ import { isFunction } from "@thi.ng/checks/is-function";
3
3
  const css = (rules) => {
4
4
  let css2 = "";
5
5
  let v;
6
- for (let r in rules) {
6
+ for (const r in rules) {
7
7
  v = deref(rules[r]);
8
8
  if (isFunction(v)) v = v(rules);
9
9
  if (v != null) css2 += `${r}:${v};`;
package/deref.js CHANGED
@@ -2,7 +2,7 @@ import { implementsFunction } from "@thi.ng/checks/implements-function";
2
2
  const derefContext = (ctx, keys) => {
3
3
  if (ctx == null || !keys || !keys.length) return ctx;
4
4
  const res = { ...ctx };
5
- for (let k of keys) {
5
+ for (const k of keys) {
6
6
  const v = res[k];
7
7
  if (implementsFunction(v, "deref")) res[k] = v.deref();
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup",
3
- "version": "5.3.32",
3
+ "version": "5.3.34",
4
4
  "description": "HTML/SVG/XML serialization of nested data structures, iterables & closures",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,13 +39,13 @@
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/checks": "^3.7.25",
44
- "@thi.ng/errors": "^2.5.49",
45
- "@thi.ng/strings": "^3.9.30"
42
+ "@thi.ng/api": "^8.12.11",
43
+ "@thi.ng/checks": "^3.8.1",
44
+ "@thi.ng/errors": "^2.6.0",
45
+ "@thi.ng/strings": "^3.9.32"
46
46
  },
47
47
  "devDependencies": {
48
- "@thi.ng/atom": "^5.3.50",
48
+ "@thi.ng/atom": "^5.3.52",
49
49
  "esbuild": "^0.27.0",
50
50
  "typedoc": "^0.28.14",
51
51
  "typescript": "^5.9.3"
@@ -130,5 +130,5 @@
130
130
  ],
131
131
  "year": 2016
132
132
  },
133
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
133
+ "gitHead": "e7a21b9d2a188fa04d4c893d8531c40fbc0f4c06\n"
134
134
  }
package/serialize.js CHANGED
@@ -53,7 +53,7 @@ const __serializeTag = (tree, opts, path) => {
53
53
  };
54
54
  const __serializeAttribs = (attribs, opts) => {
55
55
  let res = "";
56
- for (let a in attribs) {
56
+ for (const a in attribs) {
57
57
  if (a.startsWith("__")) continue;
58
58
  const v = __serializeAttrib(attribs, a, deref(attribs[a]), opts);
59
59
  v != null && (res += v);
@@ -69,7 +69,7 @@ const __attribPair = (a, v, opts) => {
69
69
  };
70
70
  const __serializeDataAttribs = (data, opts) => {
71
71
  let res = "";
72
- for (let id in data) {
72
+ for (const id in data) {
73
73
  let v = deref(data[id]);
74
74
  isFunction(v) && (v = v(data));
75
75
  v != null && (res += ` data-${id}="${__escape(v, opts)}"`);
@@ -103,7 +103,7 @@ const __serializeIter = (iter, opts, path) => {
103
103
  const res = [];
104
104
  const p = path.slice(0, path.length - 1);
105
105
  let k = 0;
106
- for (let i of iter) {
106
+ for (const i of iter) {
107
107
  res.push(__serialize(i, opts, [...p, k++]));
108
108
  }
109
109
  return res.join("");