@danielsimonjr/mathts-units 0.1.16 → 0.1.17

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 (2) hide show
  1. package/README.md +31 -31
  2. package/package.json +60 -60
package/README.md CHANGED
@@ -1,31 +1,31 @@
1
- # @danielsimonjr/mathts-units
2
-
3
- Standalone units & dimensional analysis for [MathTS](https://github.com/danielsimonjr/mathts).
4
-
5
- A focused entry point over the unit system in
6
- [`@danielsimonjr/mathts-core`](https://www.npmjs.com/package/@danielsimonjr/mathts-core).
7
- The implementation is re-exported, not duplicated.
8
-
9
- ## Install
10
-
11
- ```sh
12
- npm install @danielsimonjr/mathts-units
13
- ```
14
-
15
- ## What it exports
16
-
17
- - `Unit` -- dimensional quantity class (`new Unit(5, 'km')`), with `.to()`, `.toBest()`, `.value`, `.type`.
18
- - `isUnit` / `isUnitValue` -- type guards.
19
- - `DimensionMismatchError`, `UnitParseError` -- error types.
20
- - Registry: `BASE_UNITS`, `DERIVED_UNITS`, `ALL_UNITS`, `UNIT_ALIASES`, `getUnitDef`.
21
- - Prefixes: `SI_PREFIXES`, `BEST_PREFIXES`, `getPrefix`.
22
- - `DIMENSIONLESS`, `dim`, and the `Dimensions` / `UnitDef` types.
23
-
24
- ```ts
25
- import { Unit } from '@danielsimonjr/mathts-units';
26
- new Unit(100, 'km/h').to('m/s').value; // 27.777...
27
- ```
28
-
29
- ## License
30
-
31
- MIT (c) Daniel Simon Jr.
1
+ # @danielsimonjr/mathts-units
2
+
3
+ Standalone units & dimensional analysis for [MathTS](https://github.com/danielsimonjr/mathts).
4
+
5
+ A focused entry point over the unit system in
6
+ [`@danielsimonjr/mathts-core`](https://www.npmjs.com/package/@danielsimonjr/mathts-core).
7
+ The implementation is re-exported, not duplicated.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install @danielsimonjr/mathts-units
13
+ ```
14
+
15
+ ## What it exports
16
+
17
+ - `Unit` -- dimensional quantity class (`new Unit(5, 'km')`), with `.to()`, `.toBest()`, `.value`, `.type`.
18
+ - `isUnit` / `isUnitValue` -- type guards.
19
+ - `DimensionMismatchError`, `UnitParseError` -- error types.
20
+ - Registry: `BASE_UNITS`, `DERIVED_UNITS`, `ALL_UNITS`, `UNIT_ALIASES`, `getUnitDef`.
21
+ - Prefixes: `SI_PREFIXES`, `BEST_PREFIXES`, `getPrefix`.
22
+ - `DIMENSIONLESS`, `dim`, and the `Dimensions` / `UnitDef` types.
23
+
24
+ ```ts
25
+ import { Unit } from '@danielsimonjr/mathts-units';
26
+ new Unit(100, 'km/h').to('m/s').value; // 27.777...
27
+ ```
28
+
29
+ ## License
30
+
31
+ MIT (c) Daniel Simon Jr.
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "@danielsimonjr/mathts-units",
3
- "version": "0.1.16",
4
- "description": "Standalone units & dimensional-analysis for MathTS -- the Unit class, unit registry, and SI prefixes, 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 --clean && tsc -p tsconfig.dts.json",
23
- "dev": "tsup src/index.ts --format esm --dts --watch",
24
- "test": "bun test",
25
- "test:watch": "vitest",
26
- "test:coverage": "bun test --coverage",
27
- "typecheck": "tsc --noEmit",
28
- "lint": "oxlint src",
29
- "lint:fix": "oxlint src --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.15.0",
35
- "typed-function": "^4.0.0"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^26.4.0",
39
- "tsup": "^8.0.0",
40
- "typescript": "^7.0.2",
41
- "vitest": "^5.0.0"
42
- },
43
- "publishConfig": {
44
- "access": "public"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/danielsimonjr/MathTS.git",
49
- "directory": "units"
50
- },
51
- "keywords": [
52
- "math",
53
- "typescript",
54
- "units",
55
- "dimensional-analysis",
56
- "physics",
57
- "conversion",
58
- "si"
59
- ]
60
- }
1
+ {
2
+ "name": "@danielsimonjr/mathts-units",
3
+ "version": "0.1.17",
4
+ "description": "Standalone units & dimensional-analysis for MathTS -- the Unit class, unit registry, and SI prefixes, 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 --clean && tsc -p tsconfig.dts.json",
23
+ "dev": "tsup src/index.ts --format esm --dts --watch",
24
+ "test": "bun test",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "bun test --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "oxlint src",
29
+ "lint:fix": "oxlint src --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.15.4",
35
+ "typed-function": "^4.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^26.4.0",
39
+ "tsup": "^8.0.0",
40
+ "typescript": "^7.0.2",
41
+ "vitest": "^5.0.0"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/danielsimonjr/MathTS.git",
49
+ "directory": "units"
50
+ },
51
+ "keywords": [
52
+ "math",
53
+ "typescript",
54
+ "units",
55
+ "dimensional-analysis",
56
+ "physics",
57
+ "conversion",
58
+ "si"
59
+ ]
60
+ }