@jackens/nnn 2026.2.20 → 2026.2.23

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.
Files changed (4) hide show
  1. package/nnn.d.ts +31 -31
  2. package/nnn.js +130 -130
  3. package/package.json +9 -8
  4. package/readme.md +139 -172
package/nnn.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Represents a CSS rule node for the {@link c} helper. Keys are CSS properties or nested selectors.
3
3
  */
4
4
  export type CNode = {
5
- [attribute_or_selector: string]: string | number | CNode | undefined;
5
+ [attributeOrSelector: string]: string | number | CNode | undefined;
6
6
  };
7
7
  /**
8
8
  * Represents the root CSS object for the {@link c} helper. Keys are top-level selectors or at-rules.
@@ -52,7 +52,7 @@ export declare const c: (root: CRoot, splitter?: string) => string;
52
52
  *
53
53
  * A 2D array where each inner array represents a row of fields.
54
54
  */
55
- export declare const csv_parse: (csv: string, separator?: string) => string[][];
55
+ export declare const csvParse: (csv: string, separator?: string) => string[][];
56
56
  /**
57
57
  * Applies Polish-specific typographic corrections to a DOM subtree.
58
58
  *
@@ -65,7 +65,7 @@ export declare const csv_parse: (csv: string, separator?: string) => string[][];
65
65
  * The root DOM node to process. All descendant text nodes are corrected recursively,
66
66
  * except those inside `IFRAME`, `NOSCRIPT`, `PRE`, `SCRIPT`, `STYLE`, or `TEXTAREA` elements.
67
67
  */
68
- export declare const fix_pl_typography: (node: Node) => void;
68
+ export declare const fixPlTypography: (node: Node) => void;
69
69
  /**
70
70
  * Single argument type for the {@link h} and {@link s} helpers.
71
71
  */
@@ -77,7 +77,7 @@ export type HArgs = [string | Node, ...HArgs1[]];
77
77
  /**
78
78
  * A lightweight [HyperScript](https://github.com/hyperhype/hyperscript)-style helper for creating and modifying `HTMLElement`s (see also {@link s}).
79
79
  *
80
- * @param tag_or_node
80
+ * @param tagOrNode
81
81
  *
82
82
  * If a `string`, it is treated as the tag name for a new element.
83
83
  * If a `Node`, that node is modified in place.
@@ -99,12 +99,12 @@ export type HArgs = [string | Node, ...HArgs1[]];
99
99
  export declare const h: {
100
100
  <T extends keyof HTMLElementTagNameMap>(tag: T, ...args1: HArgs1[]): HTMLElementTagNameMap[T];
101
101
  <N extends Node>(node: N, ...args1: HArgs1[]): N;
102
- (tag_or_node: string | Node, ...args1: HArgs1[]): Node;
102
+ (tagOrNode: string | Node, ...args1: HArgs1[]): Node;
103
103
  };
104
104
  /**
105
105
  * A lightweight [HyperScript](https://github.com/hyperhype/hyperscript)-style helper for creating and modifying `SVGElement`s (see also {@link h}).
106
106
  *
107
- * @param tag_or_node
107
+ * @param tagOrNode
108
108
  *
109
109
  * If a `string`, it is treated as the tag name for a new element.
110
110
  * If a `Node`, that node is modified in place.
@@ -126,7 +126,7 @@ export declare const h: {
126
126
  export declare const s: {
127
127
  <T extends keyof SVGElementTagNameMap>(tag: T, ...args1: HArgs1[]): SVGElementTagNameMap[T];
128
128
  <N extends Node>(node: N, ...args1: HArgs1[]): N;
129
- (tag_or_node: string | Node, ...args1: HArgs1[]): Node;
129
+ (tagOrNode: string | Node, ...args1: HArgs1[]): Node;
130
130
  };
131
131
  /**
132
132
  * Checks whether an object has the specified key as its own property.
@@ -145,7 +145,7 @@ export declare const s: {
145
145
  *
146
146
  * `true` if `ref` is not nullish and has `key` as an own property, `false` otherwise.
147
147
  */
148
- export declare const has_own: (ref: unknown, key: unknown) => boolean;
148
+ export declare const hasOown: (ref: unknown, key: unknown) => boolean;
149
149
  /**
150
150
  * Checks whether the argument is an array.
151
151
  *
@@ -157,7 +157,7 @@ export declare const has_own: (ref: unknown, key: unknown) => boolean;
157
157
  *
158
158
  * `true` if `arg` is an array, `false` otherwise.
159
159
  */
160
- export declare const is_array: (arg: unknown) => arg is unknown[];
160
+ export declare const isArray: (arg: unknown) => arg is unknown[];
161
161
  /**
162
162
  * Checks whether the argument is a finite number (excludes `±Infinity` and `NaN`).
163
163
  *
@@ -169,7 +169,7 @@ export declare const is_array: (arg: unknown) => arg is unknown[];
169
169
  *
170
170
  * `true` if `arg` is a finite number, `false` otherwise.
171
171
  */
172
- export declare const is_finite_number: (arg: unknown) => arg is number;
172
+ export declare const isFiniteNumber: (arg: unknown) => arg is number;
173
173
  /**
174
174
  * Checks whether the argument is of type `number` (includes `NaN` and `±Infinity`).
175
175
  *
@@ -181,7 +181,7 @@ export declare const is_finite_number: (arg: unknown) => arg is number;
181
181
  *
182
182
  * `true` if `typeof arg === 'number'`, `false` otherwise.
183
183
  */
184
- export declare const is_number: (arg: unknown) => arg is number;
184
+ export declare const isNumber: (arg: unknown) => arg is number;
185
185
  /**
186
186
  * Checks whether the argument is a plain object (not `null` and not an array).
187
187
  *
@@ -193,7 +193,7 @@ export declare const is_number: (arg: unknown) => arg is number;
193
193
  *
194
194
  * `true` if `arg` is a plain object, `false` otherwise.
195
195
  */
196
- export declare const is_record: (arg: unknown) => arg is Record<PropertyKey, unknown>;
196
+ export declare const isRecord: (arg: unknown) => arg is Record<PropertyKey, unknown>;
197
197
  /**
198
198
  * Checks whether the argument is a string.
199
199
  *
@@ -205,7 +205,7 @@ export declare const is_record: (arg: unknown) => arg is Record<PropertyKey, unk
205
205
  *
206
206
  * `true` if `typeof arg === 'string'`, `false` otherwise.
207
207
  */
208
- export declare const is_string: (arg: unknown) => arg is string;
208
+ export declare const isString: (arg: unknown) => arg is string;
209
209
  /**
210
210
  * Parses JSON with support for handler-based value transformation (“JavaScript ON”).
211
211
  *
@@ -224,13 +224,13 @@ export declare const is_string: (arg: unknown) => arg is string;
224
224
  *
225
225
  * The parsed value with handler substitutions applied.
226
226
  */
227
- export declare const js_on_parse: (handlers: Record<PropertyKey, Function>, text: string) => any;
227
+ export declare const jsOnParse: (handlers: Record<PropertyKey, Function>, text: string) => any;
228
228
  /**
229
- * A Monokai-inspired color scheme for use with the {@link c} helper and {@link nanolight_ts} tokenizer.
229
+ * A Monokai-inspired color scheme for use with the {@link c} helper and {@link nanolightTs} tokenizer.
230
230
  */
231
231
  export declare const monokai: CRoot;
232
232
  /**
233
- * A TypeScript/JavaScript syntax highlighting tokenizer built using {@link new_tokenizer}.
233
+ * A TypeScript/JavaScript syntax highlighting tokenizer built using {@link newTokenizer}.
234
234
  *
235
235
  * @param code
236
236
  *
@@ -240,17 +240,17 @@ export declare const monokai: CRoot;
240
240
  *
241
241
  * An array of {@link HArgs1} elements suitable for rendering with {@link h}.
242
242
  */
243
- export declare const nanolight_ts: (code: string) => HArgs1[];
243
+ export declare const nanolightTs: (code: string) => HArgs1[];
244
244
  /**
245
245
  * A map from value constructors (or `null`/`undefined`) to escape functions.
246
246
  *
247
- * Used by {@link escape_values} and {@link new_escape}.
247
+ * Used by {@link escapeValues} and {@link newEscape}.
248
248
  */
249
249
  export type EscapeMap = Map<unknown, (value?: unknown) => string>;
250
250
  /**
251
251
  * Escapes an array of values using the provided escape map.
252
252
  *
253
- * @param escape_map
253
+ * @param escapeMap
254
254
  *
255
255
  * A map where keys are constructors (e.g., `String`, `Number`) and values are escape functions.
256
256
  *
@@ -262,11 +262,11 @@ export type EscapeMap = Map<unknown, (value?: unknown) => string>;
262
262
  *
263
263
  * An array of escaped strings.
264
264
  */
265
- export declare const escape_values: (escape_map: EscapeMap, values: unknown[]) => string[];
265
+ export declare const escapeValues: (escapeMap: EscapeMap, values: unknown[]) => string[];
266
266
  /**
267
267
  * Creates a tag function for escaping interpolated values in template literals.
268
268
  *
269
- * @param escape_map
269
+ * @param escapeMap
270
270
  *
271
271
  * A map where keys are constructors and values are escape functions.
272
272
  *
@@ -274,7 +274,7 @@ export declare const escape_values: (escape_map: EscapeMap, values: unknown[]) =
274
274
  *
275
275
  * A tag function that escapes interpolated values using the provided escape map.
276
276
  */
277
- export declare const new_escape: (escape_map: EscapeMap) => (template: TemplateStringsArray, ...values: unknown[]) => string;
277
+ export declare const newEscape: (escapeMap: EscapeMap) => (template: TemplateStringsArray, ...values: unknown[]) => string;
278
278
  /**
279
279
  * Creates a function that returns the appropriate noun form based on a numeric value using `Intl.PluralRules`.
280
280
  *
@@ -301,9 +301,9 @@ export declare const new_escape: (escape_map: EscapeMap) => (template: TemplateS
301
301
  *
302
302
  * A function that takes a numeric value and returns the appropriate noun form.
303
303
  */
304
- export declare const new_noun_form: (locale: string, forms: Partial<Record<Intl.LDMLPluralRule, string>>) => (value: number) => string;
304
+ export declare const newNounForm: (locale: string, forms: Partial<Record<Intl.LDMLPluralRule, string>>) => (value: number) => string;
305
305
  /**
306
- * A helper for building simple tokenizers (see also {@link nanolight_ts}).
306
+ * A helper for building simple tokenizers (see also {@link nanolightTs}).
307
307
  *
308
308
  * @param decorator
309
309
  *
@@ -327,7 +327,7 @@ export declare const new_noun_form: (locale: string, forms: Partial<Record<Intl.
327
327
  * 2. Among matches at the same position, the longer one wins.
328
328
  * 3. Among matches of the same position and length, the one defined earlier wins.
329
329
  */
330
- export declare const new_tokenizer: <M, T>(decorator: (chunk: string, metadata?: M) => T, ...specs: [M, string | RegExp][]) => (code: string) => T[];
330
+ export declare const newTokenizer: <M, T>(decorator: (chunk: string, metadata?: M) => T, ...specs: [M, string | RegExp][]) => (code: string) => T[];
331
331
  /**
332
332
  * Creates a new object excluding the specified keys from the source object.
333
333
  *
@@ -375,22 +375,22 @@ export declare const pick: <T, K extends keyof T>(ref: T, keys: K[]) => Pick<T,
375
375
  *
376
376
  * The CSS selector for the grid item.
377
377
  *
378
- * @param cell_width_px
378
+ * @param cellWidthPx
379
379
  *
380
380
  * The base cell width in pixels.
381
381
  *
382
- * @param cell_height_px
382
+ * @param cellHeightPx
383
383
  *
384
384
  * The base cell height in pixels.
385
385
  *
386
386
  * @param specs
387
387
  *
388
388
  * An array of breakpoint specifications, each a tuple of:
389
- * - `max_width`: maximum number of cells per row (defines the viewport breakpoint).
389
+ * - `maxWidth`: maximum number of cells per row (defines the viewport breakpoint).
390
390
  * - `width` (optional, default `1`): number of horizontal cells the element spans.
391
391
  * - `height` (optional, default `1`): number of vertical cells the element spans.
392
392
  */
393
- export declare const rwd: (root: CRoot, selector: string, cell_width_px: number, cell_height_px: number, ...specs: [number, number?, number?][]) => void;
393
+ export declare const rwd: (root: CRoot, selector: string, cellWidthPx: number, cellHeightPx: number, ...specs: [number, number?, number?][]) => void;
394
394
  /**
395
395
  * Shorthand for creating an SVG element with a `<use>` child referencing an icon by ID.
396
396
  *
@@ -408,7 +408,7 @@ export declare const rwd: (root: CRoot, selector: string, cell_width_px: number,
408
408
  *
409
409
  * An `SVGSVGElement` containing a `<use>` element.
410
410
  */
411
- export declare const svg_use: (id: string, ...args: HArgs1[]) => SVGSVGElement;
411
+ export declare const svgUse: (id: string, ...args: HArgs1[]) => SVGSVGElement;
412
412
  /**
413
413
  * Generates a UUID v1 (time-based) identifier.
414
414
  *
@@ -425,7 +425,7 @@ export declare const svg_use: (id: string, ...args: HArgs1[]) => SVGSVGElement;
425
425
  *
426
426
  * A UUID v1 `string` in the standard format `xxxxxxxx-xxxx-1xxx-xxxx-xxxxxxxxxxxx`.
427
427
  */
428
- export declare const uuid_v1: (date?: Date, node?: string) => string;
428
+ export declare const uuidV1: (date?: Date, node?: string) => string;
429
429
  /**
430
430
  * A Proxy-based helper for auto-vivification of nested object structures.
431
431
  *