Skip to content

Commit

Permalink
fix minor inspection findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Dec 13, 2024
1 parent fbbc91b commit dee984c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions docs/src/examples/sequence/BeautifulMath.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ <h2>Simple SVG Graphics: Beautiful Math</h2>
const table = S.Walk(1, slices).map( n => [n, n * tableFactor]);
const angles = S.Walk(0, Number.MAX_VALUE, Math.PI * 2 / slices);

const lines = table
svg.innerHTML = table
.map(valuePair => valuePair.map(n => angles.drop(n).head()))
.map(anglePair => anglePair.map(angle2point))
.map(points2Line)
.foldl$(S.plus, circle );
svg.innerHTML = lines;
.foldl$(S.plus, circle);
};
draw();
[tableFactorEl, slicesEl].forEach( el => el.oninput = () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/sequence/Leibniz_Nilakantha.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ <h1>The Heros approximating PI</h1>
Limit * 4: ${leibniz}
`;

const [nout] = select(document.body, "#nilaOut");
nout.textContent = `
const [nilaOut] = select(document.body, "#nilaOut");
nilaOut.textContent = `
Partial sum sequence
${partialNilaSums.show()}
Expand Down
7 changes: 3 additions & 4 deletions docs/src/kolibri/util/domTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { withDebugTestArrayAppender } from "../logger/loggerTest.js";
import { setLoggingLevel, setLoggingContext } from "../logger/logging.js";
import { LOG_WARN } from "../logger/logLevel.js";
import { dom, fireChangeEvent, select } from "./dom.js";
import { count$ } from "../sequence/terminalOperations/count/count.js";

const domSuite = TestSuite("util/dom");

Expand All @@ -30,9 +29,9 @@ domSuite.add("select with children", assert => {
const [result1] = select(root, "a"); // one hit
assert.is(result1.nodeName, "A");
const result2 = select(root, "p, a"); // combined selector
assert.is(count$(result2), 2);
assert.is(result2.count$(), 2);
const result3 = select(root, "*"); // wildcard does not include the root
assert.is(count$(result3), 2);
assert.is(result3.count$(), 2);
});

domSuite.add("failed select should log a warning", assert => {
Expand All @@ -43,7 +42,7 @@ domSuite.add("failed select should log a warning", assert => {

const result = select(root, "no-such-selector");

assert.is(result.length, 0);
assert.is(result.count$(), 0);
assert.is(appender.getValue()[0], 'Selector "no-such-selector" did not select any nodes in "<div><p><a></a></p></div>"');
});
});
Expand Down

0 comments on commit dee984c

Please sign in to comment.