@danielsimonjr/mathts-units 0.1.17 → 0.3.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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -2
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
export { Unit, isUnit, isUnitValue, DimensionMismatchError, UnitParseError, DIMENSIONLESS, dim, BASE_UNITS, DERIVED_UNITS, ALL_UNITS, UNIT_ALIASES, getUnitDef, SI_PREFIXES, BEST_PREFIXES, getPrefix, } from '@danielsimonjr/mathts-core';
|
|
13
|
-
export type { Dimensions, UnitDef } from '@danielsimonjr/mathts-core';
|
|
12
|
+
export { Unit, isUnit, isUnitValue, DimensionMismatchError, UnitParseError, DIMENSIONLESS, dim, UNIT_DIMENSION_LENGTH, SI_DIMENSION_LENGTH, toSiDimensions, toSiDimensionVector, fromSiDimensions, fromSiDimensionVector, BASE_UNITS, DERIVED_UNITS, ALL_UNITS, UNIT_ALIASES, getUnitDef, SI_PREFIXES, BEST_PREFIXES, getPrefix, UNIT_EXACT_SCALE, PI_EXACT_SCALE, decimalExactScale, exactScaleOf, binaryExactScale, ratioExactScale, multiplyExactScales, divideExactScales, powerExactScale, addExactScales, exactScalesEqual, exactScaleToNumber, formatExactScale, readScaleExpression, NAMED_SCALES, UNIT_ROWS, UNIT_ROW_ALIASES, namedExactScale, readUnitScale, getUnitRow, unitRowExactScale, unitRowValue, unitRowExactOffset, UNIT_PREFIX_SETS, unitPrefixExactScale, getUnitPrefix, } from '@danielsimonjr/mathts-core';
|
|
13
|
+
export type { Dimensions, UnitDef, SiDimensionVector, SiDimensionOptions, ExactScale, UnitRow, UnitBaseKey, UnitPrefixSetKey, UnitPrefix, } from '@danielsimonjr/mathts-core';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,IAAI,EACJ,MAAM,EACN,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,GAAG,EACH,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,IAAI,EACJ,MAAM,EACN,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,GAAG,EACH,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,UAAU,GACX,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,12 @@ import {
|
|
|
7
7
|
UnitParseError,
|
|
8
8
|
DIMENSIONLESS,
|
|
9
9
|
dim,
|
|
10
|
+
UNIT_DIMENSION_LENGTH,
|
|
11
|
+
SI_DIMENSION_LENGTH,
|
|
12
|
+
toSiDimensions,
|
|
13
|
+
toSiDimensionVector,
|
|
14
|
+
fromSiDimensions,
|
|
15
|
+
fromSiDimensionVector,
|
|
10
16
|
BASE_UNITS,
|
|
11
17
|
DERIVED_UNITS,
|
|
12
18
|
ALL_UNITS,
|
|
@@ -14,7 +20,33 @@ import {
|
|
|
14
20
|
getUnitDef,
|
|
15
21
|
SI_PREFIXES,
|
|
16
22
|
BEST_PREFIXES,
|
|
17
|
-
getPrefix
|
|
23
|
+
getPrefix,
|
|
24
|
+
UNIT_EXACT_SCALE,
|
|
25
|
+
PI_EXACT_SCALE,
|
|
26
|
+
decimalExactScale,
|
|
27
|
+
exactScaleOf,
|
|
28
|
+
binaryExactScale,
|
|
29
|
+
ratioExactScale,
|
|
30
|
+
multiplyExactScales,
|
|
31
|
+
divideExactScales,
|
|
32
|
+
powerExactScale,
|
|
33
|
+
addExactScales,
|
|
34
|
+
exactScalesEqual,
|
|
35
|
+
exactScaleToNumber,
|
|
36
|
+
formatExactScale,
|
|
37
|
+
readScaleExpression,
|
|
38
|
+
NAMED_SCALES,
|
|
39
|
+
UNIT_ROWS,
|
|
40
|
+
UNIT_ROW_ALIASES,
|
|
41
|
+
namedExactScale,
|
|
42
|
+
readUnitScale,
|
|
43
|
+
getUnitRow,
|
|
44
|
+
unitRowExactScale,
|
|
45
|
+
unitRowValue,
|
|
46
|
+
unitRowExactOffset,
|
|
47
|
+
UNIT_PREFIX_SETS,
|
|
48
|
+
unitPrefixExactScale,
|
|
49
|
+
getUnitPrefix
|
|
18
50
|
} from "@danielsimonjr/mathts-core";
|
|
19
51
|
export {
|
|
20
52
|
ALL_UNITS,
|
|
@@ -23,13 +55,45 @@ export {
|
|
|
23
55
|
DERIVED_UNITS,
|
|
24
56
|
DIMENSIONLESS,
|
|
25
57
|
DimensionMismatchError,
|
|
58
|
+
NAMED_SCALES,
|
|
59
|
+
PI_EXACT_SCALE,
|
|
60
|
+
SI_DIMENSION_LENGTH,
|
|
26
61
|
SI_PREFIXES,
|
|
27
62
|
UNIT_ALIASES,
|
|
63
|
+
UNIT_DIMENSION_LENGTH,
|
|
64
|
+
UNIT_EXACT_SCALE,
|
|
65
|
+
UNIT_PREFIX_SETS,
|
|
66
|
+
UNIT_ROWS,
|
|
67
|
+
UNIT_ROW_ALIASES,
|
|
28
68
|
Unit,
|
|
29
69
|
UnitParseError,
|
|
70
|
+
addExactScales,
|
|
71
|
+
binaryExactScale,
|
|
72
|
+
decimalExactScale,
|
|
30
73
|
dim,
|
|
74
|
+
divideExactScales,
|
|
75
|
+
exactScaleOf,
|
|
76
|
+
exactScaleToNumber,
|
|
77
|
+
exactScalesEqual,
|
|
78
|
+
formatExactScale,
|
|
79
|
+
fromSiDimensionVector,
|
|
80
|
+
fromSiDimensions,
|
|
31
81
|
getPrefix,
|
|
32
82
|
getUnitDef,
|
|
83
|
+
getUnitPrefix,
|
|
84
|
+
getUnitRow,
|
|
33
85
|
isUnit,
|
|
34
|
-
isUnitValue
|
|
86
|
+
isUnitValue,
|
|
87
|
+
multiplyExactScales,
|
|
88
|
+
namedExactScale,
|
|
89
|
+
powerExactScale,
|
|
90
|
+
ratioExactScale,
|
|
91
|
+
readScaleExpression,
|
|
92
|
+
readUnitScale,
|
|
93
|
+
toSiDimensionVector,
|
|
94
|
+
toSiDimensions,
|
|
95
|
+
unitPrefixExactScale,
|
|
96
|
+
unitRowExactOffset,
|
|
97
|
+
unitRowExactScale,
|
|
98
|
+
unitRowValue
|
|
35
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/mathts-units",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Standalone units & dimensional-analysis for MathTS -- the Unit class, unit registry, and SI prefixes, re-exported as a focused package",
|
|
5
5
|
"author": "Daniel Simon Jr.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
23
|
-
"dev": "tsup src/index.ts --format esm --
|
|
23
|
+
"dev": "tsup src/index.ts --format esm --watch --onSuccess \"tsc -p tsconfig.dts.json\"",
|
|
24
24
|
"test": "bun test",
|
|
25
25
|
"test:watch": "vitest",
|
|
26
26
|
"test:coverage": "bun test --coverage",
|
|
27
|
-
"typecheck": "tsc --noEmit",
|
|
27
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
28
28
|
"lint": "oxlint src",
|
|
29
29
|
"lint:fix": "oxlint src --fix",
|
|
30
30
|
"clean": "rm -rf dist",
|
|
31
|
-
"build:prod": "tsup src/index.ts --format esm --
|
|
31
|
+
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake && tsc -p tsconfig.dts.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@danielsimonjr/mathts-core": "^0.
|
|
34
|
+
"@danielsimonjr/mathts-core": "^0.17.0",
|
|
35
35
|
"typed-function": "^4.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|