@danielsimonjr/mathts-numbers 0.1.0

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/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @danielsimonjr/mathts-numbers
2
+
3
+ Standalone numeric types for [MathTS](https://github.com/danielsimonjr/mathts):
4
+ `Complex`, `Fraction`, and `BigNumber`.
5
+
6
+ A focused entry point over the numeric types in
7
+ [`@danielsimonjr/mathts-core`](https://www.npmjs.com/package/@danielsimonjr/mathts-core).
8
+ The implementation is re-exported, not duplicated.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @danielsimonjr/mathts-numbers
14
+ ```
15
+
16
+ ## What it exports
17
+
18
+ - `Complex` + `isComplex` + `I`, `COMPLEX_ZERO/ONE/NEG_ONE`.
19
+ - `Fraction` + `isFraction` + `FRACTION_ZERO/ONE/NEG_ONE/HALF/THIRD/QUARTER`.
20
+ - `BigNumber` + `isBigNumber` + `BIGNUMBER_ZERO/ONE/NEG_ONE/TEN/PI/E/LN2/LN10`.
21
+ - Types: `IComplex`, `IFraction`, `IBigNumber`, `BigNumberConfig`, `RoundingMode`.
22
+
23
+ ## License
24
+
25
+ MIT (c) Daniel Simon Jr.
@@ -0,0 +1 @@
1
+ export { BIGNUMBER_E, BIGNUMBER_LN10, BIGNUMBER_LN2, BIGNUMBER_NEG_ONE, BIGNUMBER_ONE, BIGNUMBER_PI, BIGNUMBER_TEN, BIGNUMBER_ZERO, BigNumber, BigNumberConfig, COMPLEX_NEG_ONE, COMPLEX_ONE, COMPLEX_ZERO, Complex, FRACTION_HALF, FRACTION_NEG_ONE, FRACTION_ONE, FRACTION_QUARTER, FRACTION_THIRD, FRACTION_ZERO, Fraction, I, IBigNumber, IComplex, IFraction, RoundingMode, isBigNumber, isComplex, isFraction } from '@danielsimonjr/mathts-core';
package/dist/index.js ADDED
@@ -0,0 +1,53 @@
1
+ // src/index.ts
2
+ import {
3
+ Complex,
4
+ isComplex,
5
+ I,
6
+ COMPLEX_ZERO,
7
+ COMPLEX_ONE,
8
+ COMPLEX_NEG_ONE,
9
+ Fraction,
10
+ isFraction,
11
+ FRACTION_ZERO,
12
+ FRACTION_ONE,
13
+ FRACTION_NEG_ONE,
14
+ FRACTION_HALF,
15
+ FRACTION_THIRD,
16
+ FRACTION_QUARTER,
17
+ BigNumber,
18
+ isBigNumber,
19
+ BIGNUMBER_ZERO,
20
+ BIGNUMBER_ONE,
21
+ BIGNUMBER_NEG_ONE,
22
+ BIGNUMBER_TEN,
23
+ BIGNUMBER_PI,
24
+ BIGNUMBER_E,
25
+ BIGNUMBER_LN2,
26
+ BIGNUMBER_LN10
27
+ } from "@danielsimonjr/mathts-core";
28
+ export {
29
+ BIGNUMBER_E,
30
+ BIGNUMBER_LN10,
31
+ BIGNUMBER_LN2,
32
+ BIGNUMBER_NEG_ONE,
33
+ BIGNUMBER_ONE,
34
+ BIGNUMBER_PI,
35
+ BIGNUMBER_TEN,
36
+ BIGNUMBER_ZERO,
37
+ BigNumber,
38
+ COMPLEX_NEG_ONE,
39
+ COMPLEX_ONE,
40
+ COMPLEX_ZERO,
41
+ Complex,
42
+ FRACTION_HALF,
43
+ FRACTION_NEG_ONE,
44
+ FRACTION_ONE,
45
+ FRACTION_QUARTER,
46
+ FRACTION_THIRD,
47
+ FRACTION_ZERO,
48
+ Fraction,
49
+ I,
50
+ isBigNumber,
51
+ isComplex,
52
+ isFraction
53
+ };
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@danielsimonjr/mathts-numbers",
3
+ "version": "0.1.0",
4
+ "description": "Standalone numeric types for MathTS -- Complex, Fraction, and BigNumber, re-exported as a focused package",
5
+ "author": "Daniel Simon Jr.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup src/index.ts --format esm --dts --clean",
23
+ "dev": "tsup src/index.ts --format esm --dts --watch",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint src --ext .ts",
29
+ "lint:fix": "eslint src --ext .ts --fix",
30
+ "clean": "rm -rf dist",
31
+ "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
+ },
33
+ "dependencies": {
34
+ "@danielsimonjr/mathts-core": "0.1.3"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^25.5.2",
38
+ "tsup": "^8.0.0",
39
+ "typescript": "^5.3.0",
40
+ "vitest": "^4.1.5"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/danielsimonjr/mathts",
48
+ "directory": "numbers"
49
+ },
50
+ "keywords": [
51
+ "math",
52
+ "typescript",
53
+ "complex",
54
+ "fraction",
55
+ "bignumber",
56
+ "decimal",
57
+ "numbers"
58
+ ]
59
+ }