@thi.ng/units 0.4.0 → 0.4.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/CHANGELOG.md +1 -1
- package/package.json +11 -11
- package/unit.d.ts +1 -1
- package/constants/din-sizes.d.ts +0 -10
- package/constants/din-sizes.js +0 -12
- package/constants/din.d.ts +0 -10
- package/constants/din.js +0 -11
- package/units/speed.d.ts +0 -6
- package/units/speed.js +0 -8
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/units",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Extensible SI unit creation, conversions, quantities & calculations (incl. ~170 predefined units & constants)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
28
|
-
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
|
|
28
|
+
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc constants units",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
31
|
"doc:readme": "yarn doc:stats && tools:readme",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.7.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/equiv": "^2.1.
|
|
40
|
-
"@thi.ng/errors": "^2.2.
|
|
37
|
+
"@thi.ng/api": "^8.7.6",
|
|
38
|
+
"@thi.ng/checks": "^3.3.12",
|
|
39
|
+
"@thi.ng/equiv": "^2.1.22",
|
|
40
|
+
"@thi.ng/errors": "^2.2.15"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@microsoft/api-extractor": "^7.34.4",
|
|
44
|
-
"@thi.ng/testament": "^0.3.
|
|
45
|
-
"rimraf": "^4.4.
|
|
44
|
+
"@thi.ng/testament": "^0.3.15",
|
|
45
|
+
"rimraf": "^4.4.1",
|
|
46
46
|
"tools": "^0.0.1",
|
|
47
|
-
"typedoc": "^0.23.
|
|
48
|
-
"typescript": "^
|
|
47
|
+
"typedoc": "^0.23.28",
|
|
48
|
+
"typescript": "^5.0.4"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"acceleration",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"status": "beta",
|
|
180
180
|
"year": 2021
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "abcedd9e4e06a4b631f363610eec572f79b571c1\n"
|
|
183
183
|
}
|
package/unit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDeref } from "@thi.ng/api";
|
|
2
|
-
import { Dimensions, MaybeUnit, NamedUnit, Prefix, Unit } from "./api.js";
|
|
2
|
+
import { type Dimensions, type MaybeUnit, type NamedUnit, type Prefix, type Unit } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Cache/registry for all units defined via {@link defUnit}.
|
|
5
5
|
*/
|
package/constants/din-sizes.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const DIN_A0: import("../unit.js").Quantity<number[]>;
|
|
2
|
-
export declare const DIN_A1: import("../unit.js").Quantity<number[]>;
|
|
3
|
-
export declare const DIN_A2: import("../unit.js").Quantity<number[]>;
|
|
4
|
-
export declare const DIN_A3: import("../unit.js").Quantity<number[]>;
|
|
5
|
-
export declare const DIN_A4: import("../unit.js").Quantity<number[]>;
|
|
6
|
-
export declare const DIN_A5: import("../unit.js").Quantity<number[]>;
|
|
7
|
-
export declare const DIN_A6: import("../unit.js").Quantity<number[]>;
|
|
8
|
-
export declare const DIN_A7: import("../unit.js").Quantity<number[]>;
|
|
9
|
-
export declare const DIN_A8: import("../unit.js").Quantity<number[]>;
|
|
10
|
-
//# sourceMappingURL=din-sizes.d.ts.map
|
package/constants/din-sizes.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { mm } from "../units/length.js";
|
|
2
|
-
import { quantity } from "../unit.js";
|
|
3
|
-
// https://en.wikipedia.org/wiki/ISO_216x
|
|
4
|
-
export const DIN_A0 = quantity([841, 1189], mm);
|
|
5
|
-
export const DIN_A1 = quantity([594, 841], mm);
|
|
6
|
-
export const DIN_A2 = quantity([420, 594], mm);
|
|
7
|
-
export const DIN_A3 = quantity([297, 420], mm);
|
|
8
|
-
export const DIN_A4 = quantity([210, 297], mm);
|
|
9
|
-
export const DIN_A5 = quantity([148, 210], mm);
|
|
10
|
-
export const DIN_A6 = quantity([105, 148], mm);
|
|
11
|
-
export const DIN_A7 = quantity([74, 105], mm);
|
|
12
|
-
export const DIN_A8 = quantity([52, 74], mm);
|
package/constants/din.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const DIN_A0: import("../unit.js").Value<number[]>;
|
|
2
|
-
export declare const DIN_A1: import("../unit.js").Value<number[]>;
|
|
3
|
-
export declare const DIN_A2: import("../unit.js").Value<number[]>;
|
|
4
|
-
export declare const DIN_A3: import("../unit.js").Value<number[]>;
|
|
5
|
-
export declare const DIN_A4: import("../unit.js").Value<number[]>;
|
|
6
|
-
export declare const DIN_A5: import("../unit.js").Value<number[]>;
|
|
7
|
-
export declare const DIN_A6: import("../unit.js").Value<number[]>;
|
|
8
|
-
export declare const DIN_A7: import("../unit.js").Value<number[]>;
|
|
9
|
-
export declare const DIN_A8: import("../unit.js").Value<number[]>;
|
|
10
|
-
//# sourceMappingURL=din.d.ts.map
|
package/constants/din.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { mm } from "../length.js";
|
|
2
|
-
import { value } from "../unit.js";
|
|
3
|
-
export const DIN_A0 = value([841, 1189], mm);
|
|
4
|
-
export const DIN_A1 = value([594, 841], mm);
|
|
5
|
-
export const DIN_A2 = value([420, 594], mm);
|
|
6
|
-
export const DIN_A3 = value([297, 420], mm);
|
|
7
|
-
export const DIN_A4 = value([210, 297], mm);
|
|
8
|
-
export const DIN_A5 = value([148, 210], mm);
|
|
9
|
-
export const DIN_A6 = value([105, 148], mm);
|
|
10
|
-
export const DIN_A7 = value([74, 105], mm);
|
|
11
|
-
export const DIN_A8 = value([52, 74], mm);
|
package/units/speed.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const m_s: import("../api.js").NamedUnit;
|
|
2
|
-
export declare const km_h: import("../api.js").NamedUnit;
|
|
3
|
-
export declare const ft_s: import("../api.js").NamedUnit;
|
|
4
|
-
export declare const mph: import("../api.js").NamedUnit;
|
|
5
|
-
export declare const kn: import("../api.js").NamedUnit;
|
|
6
|
-
//# sourceMappingURL=speed.d.ts.map
|
package/units/speed.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defUnit, div } from "../unit.js";
|
|
2
|
-
import { ft, km, m, mi, nmi } from "./length.js";
|
|
3
|
-
import { h, s } from "./time.js";
|
|
4
|
-
export const m_s = defUnit("m/s", "meter per second", div(m, s));
|
|
5
|
-
export const km_h = defUnit("km/h", "kilometer per hour", div(km, h));
|
|
6
|
-
export const ft_s = defUnit("ft/s", "foot per second", div(ft, s));
|
|
7
|
-
export const mph = defUnit("mph", "mile per hour", div(mi, h));
|
|
8
|
-
export const kn = defUnit("kn", "knot", div(nmi, h));
|