inibase 1.2.13 → 1.2.14

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/dist/file.js CHANGED
@@ -597,8 +597,8 @@ async function reduceNumbers(filePath, wanted = "sum", lineNumbers) {
597
597
  : null;
598
598
  /* running aggregators */
599
599
  let sum = 0;
600
- let min = Infinity;
601
- let max = -Infinity;
600
+ let min = Number.POSITIVE_INFINITY;
601
+ let max = Number.NEGATIVE_INFINITY;
602
602
  let processed = 0; // count of numeric lines we actually used
603
603
  let seen = 0; // count of filtered lines we have visited
604
604
  let line = 0;
@@ -610,8 +610,8 @@ async function reduceNumbers(filePath, wanted = "sum", lineNumbers) {
610
610
  /* skip unwanted lines */
611
611
  if (filter && !filter.has(line))
612
612
  continue;
613
- const num = Number(decode(txt, { key: "BLABLA", type: "number" })); // ← your existing decode()
614
- if (isNaN(num))
613
+ const num = Number(decode(txt, { key: "BLABLA", type: "number" }));
614
+ if (Number.isNaN(num))
615
615
  continue;
616
616
  processed++;
617
617
  if (wanted === "sum") {
@@ -23,8 +23,8 @@ export declare const hashPassword: (password: string) => string;
23
23
  */
24
24
  export declare const comparePassword: (hash: string, password: string) => boolean;
25
25
  export declare const encodeID: (id: number | string) => string;
26
- export declare function decodeID(input: string, raw: true): string;
27
- export declare function decodeID(input?: string, raw?: false): number;
26
+ export declare function decodeID(input: string, raw: true): string | null;
27
+ export declare function decodeID(input?: string, raw?: false): number | null;
28
28
  export declare const extractIdsFromSchema: (schema: Schema) => number[];
29
29
  /**
30
30
  * Finds the last ID number in a schema, potentially decoding it if encrypted.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Karim Amahtil",