@thi.ng/units 1.0.4 → 1.0.6
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/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/api.d.ts +2 -2
- package/constants/earth.d.ts +3 -3
- package/package.json +8 -9
- package/unit.d.ts +4 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/api.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export type MaybeUnit = Unit | string;
|
|
|
49
49
|
* Note: For dimensionless units, all dimensions are zero.
|
|
50
50
|
*
|
|
51
51
|
* Reference:
|
|
52
|
-
*
|
|
52
|
+
* https://en.wikipedia.org/wiki/SI_base_unit
|
|
53
53
|
*/
|
|
54
54
|
export type Dimensions = [
|
|
55
55
|
number,
|
|
@@ -67,7 +67,7 @@ export type Prefix = keyof typeof PREFIXES;
|
|
|
67
67
|
/**
|
|
68
68
|
* @remarks
|
|
69
69
|
* Reference:
|
|
70
|
-
*
|
|
70
|
+
* https://en.wikipedia.org/wiki/Metric_prefix
|
|
71
71
|
*/
|
|
72
72
|
export declare const PREFIXES: {
|
|
73
73
|
Q: number;
|
package/constants/earth.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const EARTH_RADIUS: import("../unit.js").Quantity<6371000>;
|
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
9
|
* Reference:
|
|
10
|
-
*
|
|
10
|
+
* https://en.wikipedia.org/wiki/Earth%27s_circumference
|
|
11
11
|
*/
|
|
12
12
|
export declare const EARTH_CIRCUMFERENCE: import("../unit.js").Quantity<40075017>;
|
|
13
13
|
/**
|
|
@@ -15,7 +15,7 @@ export declare const EARTH_CIRCUMFERENCE: import("../unit.js").Quantity<40075017
|
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* Reference:
|
|
18
|
-
*
|
|
18
|
+
* https://en.wikipedia.org/wiki/Gravity_of_Earth
|
|
19
19
|
*/
|
|
20
20
|
export declare const EARTH_GRAVITY: import("../unit.js").Quantity<9.78033>;
|
|
21
21
|
/**
|
|
@@ -27,7 +27,7 @@ export declare const EARTH_MASS: import("../unit.js").Quantity<5.9722e+24>;
|
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
29
|
* Reference:
|
|
30
|
-
*
|
|
30
|
+
* https://en.wikipedia.org/wiki/Gravitational_constant
|
|
31
31
|
*/
|
|
32
32
|
export declare const GRAVITATION: import("../unit.js").Quantity<6.6743e-11>;
|
|
33
33
|
//# sourceMappingURL=earth.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/units",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Extensible SI unit creation, conversions, quantities & calculations (incl. ~170 predefined units & constants)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
34
|
"clean": "bun ../../tools/src/clean-package.ts constants units",
|
|
35
35
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
37
36
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
38
37
|
"pub": "yarn npm publish --access public",
|
|
39
38
|
"test": "bun test",
|
|
40
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/checks": "^3.6.
|
|
45
|
-
"@thi.ng/equiv": "^2.1.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
42
|
+
"@thi.ng/api": "^8.11.20",
|
|
43
|
+
"@thi.ng/checks": "^3.6.23",
|
|
44
|
+
"@thi.ng/equiv": "^2.1.76",
|
|
45
|
+
"@thi.ng/errors": "^2.5.26"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"esbuild": "^0.
|
|
50
|
-
"typedoc": "^0.27.
|
|
48
|
+
"esbuild": "^0.25.0",
|
|
49
|
+
"typedoc": "^0.27.7",
|
|
51
50
|
"typescript": "^5.7.3"
|
|
52
51
|
},
|
|
53
52
|
"keywords": [
|
|
@@ -182,5 +181,5 @@
|
|
|
182
181
|
"status": "beta",
|
|
183
182
|
"year": 2021
|
|
184
183
|
},
|
|
185
|
-
"gitHead": "
|
|
184
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
186
185
|
}
|
package/unit.d.ts
CHANGED
|
@@ -89,9 +89,10 @@ export declare class Quantity<T extends number | number[]> implements IDeref<T>
|
|
|
89
89
|
* polymorphic functions: {@link div}, {@link mul}, {@link reciprocal} and
|
|
90
90
|
* {@link convert}.
|
|
91
91
|
*
|
|
92
|
-
* The {@link Quantity} class also implements the standard
|
|
93
|
-
*
|
|
94
|
-
*
|
|
92
|
+
* The {@link Quantity} class also implements the standard
|
|
93
|
+
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) interface
|
|
94
|
+
* to obtain unwrapped amount (though only should be used for dimensionless
|
|
95
|
+
* quantities). Use {@link convert} otherwise!
|
|
95
96
|
*
|
|
96
97
|
* @example
|
|
97
98
|
* ```ts tangle:../export/quantity.ts
|