@thi.ng/dot 2.1.121 → 2.1.123

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 211 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/dot",
3
- "version": "2.1.121",
3
+ "version": "2.1.123",
4
4
  "description": "Graphviz document abstraction & serialization to DOT format",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,8 +39,8 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.12.8",
43
- "@thi.ng/checks": "^3.7.24"
42
+ "@thi.ng/api": "^8.12.10",
43
+ "@thi.ng/checks": "^3.8.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "esbuild": "^0.27.0",
@@ -87,5 +87,5 @@
87
87
  "tag": "graphviz",
88
88
  "year": 2018
89
89
  },
90
- "gitHead": "be6e7657b1e5c54d7d648d1b52888a7297e95a17\n"
90
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
91
91
  }
package/serialize.js CHANGED
@@ -4,7 +4,7 @@ const __nextSubgraphID = () => "cluster" + __nextID++;
4
4
  const __wrapQ = (x) => `"${x}"`;
5
5
  const __escape = (x) => String(x).replace(/"/g, `\\"`).replace(/\n/g, "\\n");
6
6
  const __formatGraphAttribs = (attribs, acc) => {
7
- for (let a in attribs) {
7
+ for (const a in attribs) {
8
8
  let v = attribs[a];
9
9
  switch (a) {
10
10
  case "bgcolor":
@@ -59,7 +59,7 @@ const __formatAttribs = (attribs) => {
59
59
  };
60
60
  const __formatPorts = (ports) => {
61
61
  const acc = [];
62
- for (let i in ports) {
62
+ for (const i in ports) {
63
63
  acc.push(`<${i}> ${__escape(ports[i])}`);
64
64
  }
65
65
  return `{ ${acc.join(" | ")} }`;
@@ -95,14 +95,14 @@ const serializeGraph = (graph, isSub = false) => {
95
95
  if (graph.attribs) {
96
96
  __formatGraphAttribs(graph.attribs, acc);
97
97
  }
98
- for (let id in graph.nodes) {
98
+ for (const id in graph.nodes) {
99
99
  acc.push(serializeNode(id, graph.nodes[id]));
100
100
  }
101
- for (let e of graph.edges) {
101
+ for (const e of graph.edges) {
102
102
  acc.push(serializeEdge(e, directed));
103
103
  }
104
104
  if (graph.sub) {
105
- for (let sub of graph.sub) {
105
+ for (const sub of graph.sub) {
106
106
  acc.push(serializeGraph(sub, true));
107
107
  }
108
108
  }