@jackens/nnn 2023.12.31 → 2024.1.2
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/chartable.js +15 -14
- package/nanolight.js +2 -2
- package/package.json +1 -1
- package/readme.md +4 -2
package/chartable.js
CHANGED
|
@@ -65,21 +65,22 @@ export const chartable = ({
|
|
|
65
65
|
const xLabelsNotPassed = !xLabels.length
|
|
66
66
|
const zLabelsNotPassed = !zLabels.length
|
|
67
67
|
|
|
68
|
-
table.querySelectorAll('tr').forEach((row, r) =>
|
|
69
|
-
const x = r - +headerRow
|
|
70
|
-
const z = c - +headerColumn
|
|
68
|
+
table.querySelectorAll('tr').forEach((row, r) =>
|
|
71
69
|
// @ts-ignore
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
row.querySelectorAll('td,th').forEach((/** @type {HTMLTableCellElement} */ col, c) => {
|
|
71
|
+
const x = r - +headerRow
|
|
72
|
+
const z = c - +headerColumn
|
|
73
|
+
const value = col.innerText
|
|
74
|
+
|
|
75
|
+
if (x >= 0 && z >= 0 && zxYNotPassed) {
|
|
76
|
+
zxY[z] = zxY[z] ?? []
|
|
77
|
+
zxY[z][x] = parseFloat(value)
|
|
78
|
+
} else if (x >= 0 && z < 0 && xLabelsNotPassed) {
|
|
79
|
+
xLabels[x] = value
|
|
80
|
+
} else if (x < 0 && z >= 0 && zLabelsNotPassed) {
|
|
81
|
+
zLabels[z] = value
|
|
82
|
+
}
|
|
83
|
+
}))
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
let bestScales = [Infinity, -Infinity, Infinity, -Infinity, Infinity]
|
package/nanolight.js
CHANGED
|
@@ -9,8 +9,8 @@ export const nanolight = (
|
|
|
9
9
|
const /** @type {import('./h.js').HArgs1[]} */ result = []
|
|
10
10
|
|
|
11
11
|
code.split(pattern).forEach((chunk, index) => {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if (chunk != null && chunk !== '') {
|
|
13
|
+
index %= highlighters.length
|
|
14
14
|
result.push(highlighters[index](chunk, index))
|
|
15
15
|
}
|
|
16
16
|
})
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Jackens’ JavaScript helpers.
|
|
4
4
|
|
|
5
|
+
<sub>Version: <code class="version">2024.1.2</code></sub>
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```sh
|
|
@@ -18,13 +20,13 @@ npm i @jackens/nnn
|
|
|
18
20
|
|
|
19
21
|
Bun (or Node.js):
|
|
20
22
|
|
|
21
|
-
```
|
|
23
|
+
```js
|
|
22
24
|
import { «something» } from '@jackens/nnn'
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
The browser (or Bun or Node.js):
|
|
26
28
|
|
|
27
|
-
```
|
|
29
|
+
```js
|
|
28
30
|
import { «something» } from './node_modules/@jackens/nnn/nnn.js'
|
|
29
31
|
```
|
|
30
32
|
|