@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 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) => row.querySelectorAll('td,th').forEach((col, c) => {
69
- const x = r - +headerRow
70
- const z = c - +headerColumn
68
+ table.querySelectorAll('tr').forEach((row, r) =>
71
69
  // @ts-ignore
72
- const value = col.innerText
73
-
74
- if (x >= 0 && z >= 0 && zxYNotPassed) {
75
- zxY[z] = zxY[z] ?? []
76
- zxY[z][x] = parseFloat(value)
77
- } else if (x >= 0 && z < 0 && xLabelsNotPassed) {
78
- xLabels[x] = value
79
- } else if (x < 0 && z >= 0 && zLabelsNotPassed) {
80
- zLabels[z] = value
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
- index %= highlighters.length
13
- if (chunk != null) {
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
@@ -40,5 +40,5 @@
40
40
  "types": "nnn.d.ts",
41
41
  "name": "@jackens/nnn",
42
42
  "type": "module",
43
- "version": "2023.12.31"
43
+ "version": "2024.1.2"
44
44
  }
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
- ```sh
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
- ```sh
29
+ ```js
28
30
  import { «something» } from './node_modules/@jackens/nnn/nnn.js'
29
31
  ```
30
32