@signpostmarv/intermediary-number 0.5.1 → 0.5.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/index.js CHANGED
@@ -2,4 +2,3 @@ export * from './lib/IntermediaryNumber';
2
2
  export * from './lib/IntermediaryNumberTypes';
3
3
  export * from './lib/Numbers';
4
4
  export * from './lib/NumberStrings';
5
- //# sourceMappingURL=index.js.map
package/lib/Docs.json.js CHANGED
@@ -4,4 +4,3 @@ export class NotAnAmountString extends Error {
4
4
  export function is_string(maybe) {
5
5
  return 'string' === typeof maybe;
6
6
  }
7
- //# sourceMappingURL=Docs.json.js.map
@@ -169,6 +169,7 @@ export declare class TokenScanParseError extends Error {
169
169
  constructor(message: string, scan: TokenScan_parsing_value, state: TokenScan_tokenizer, current?: TokenSpan<TokenSpan_types>);
170
170
  }
171
171
  export declare class TokenScan implements CanResolveMathWithDispose {
172
+ #private;
172
173
  private readonly internal;
173
174
  readonly value: string | [TokenScan, operation_types, math_types];
174
175
  private constructor();
@@ -633,10 +633,7 @@ export class TokenScan {
633
633
  this.value = value;
634
634
  }
635
635
  get parsed() {
636
- if (undefined === this.internal.parsed) {
637
- this.internal.parsed = TokenScan.parse_scan(this);
638
- }
639
- return this.internal.parsed;
636
+ return this.#parse();
640
637
  }
641
638
  get resolve_type() {
642
639
  return this.parsed.resolve_type;
@@ -653,15 +650,21 @@ export class TokenScan {
653
650
  get valid() {
654
651
  if (undefined === this.internal.valid) {
655
652
  try {
656
- this.parsed;
653
+ this.#parse();
657
654
  this.internal.valid = true;
658
655
  }
659
- catch (err) {
656
+ catch {
660
657
  this.internal.valid = false;
661
658
  }
662
659
  }
663
660
  return this.internal.valid;
664
661
  }
662
+ #parse() {
663
+ if (undefined === this.internal.parsed) {
664
+ this.internal.parsed = TokenScan.parse_scan(this);
665
+ }
666
+ return this.internal.parsed;
667
+ }
665
668
  abs() {
666
669
  return this.parsed.abs();
667
670
  }
@@ -1012,4 +1015,3 @@ export class TokenScan {
1012
1015
  }
1013
1016
  }
1014
1017
  //#endregion
1015
- //# sourceMappingURL=IntermediaryNumber.js.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=IntermediaryNumberTypes.js.map
@@ -51,4 +51,3 @@ export class NumberStrings {
51
51
  }
52
52
  }
53
53
  }
54
- //# sourceMappingURL=NumberStrings.js.map
package/lib/Numbers.js CHANGED
@@ -47,4 +47,3 @@ export class Numbers {
47
47
  return result;
48
48
  }
49
49
  }
50
- //# sourceMappingURL=Numbers.js.map
package/package.json CHANGED
@@ -11,21 +11,21 @@
11
11
  "exports": "./index.js",
12
12
  "types": "./index.d.ts",
13
13
  "devDependencies": {
14
- "@signpostmarv/eslint-config": "^0.1.0",
15
- "@types/eslint": "^8.56.10",
14
+ "@satisfactory-dev/custom-assert": "^0.2.3",
15
+ "@signpostmarv/eslint-config": "^0.2.0",
16
+ "@types/eslint": "^9.6.0",
16
17
  "@types/node": "^20.14.2",
17
18
  "c8": "^10.1.2",
18
- "eslint": "^8.57.0",
19
+ "eslint": "^9.9.1",
19
20
  "glob": "^10.4.1",
20
21
  "prettier": "^3.3.2",
21
22
  "ts-node": "^10.9.2",
22
23
  "typescript": "~5.5.2",
23
- "typescript-eslint": "^7.13.0"
24
+ "typescript-eslint": "^8.2.0"
24
25
  },
25
26
  "dependencies": {
26
- "@satisfactory-dev/custom-assert": "^0.2.2",
27
27
  "bignumber.js": "^9.1.2",
28
28
  "fraction.js": "^4.3.7"
29
29
  },
30
- "version": "0.5.1"
30
+ "version": "0.5.2"
31
31
  }
package/eslint.config.mjs DELETED
@@ -1,20 +0,0 @@
1
- import config from '@signpostmarv/eslint-config';
2
- import parser from '@typescript-eslint/parser';
3
-
4
- export default [
5
- {
6
- languageOptions: {
7
- parser,
8
- parserOptions: {
9
- project: ['./tsconfig.eslint.json'],
10
- },
11
- },
12
- },
13
- ...config,
14
- {
15
- ignores: [
16
- '**/*.js',
17
- '**/*.d.ts',
18
- ]
19
- }
20
- ];