@danielsimonjr/mathts-core 0.4.0 → 0.5.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.
|
@@ -2318,12 +2318,6 @@ function isIndex(x) {
|
|
|
2318
2318
|
function isBoolean(x) {
|
|
2319
2319
|
return typeof x === "boolean";
|
|
2320
2320
|
}
|
|
2321
|
-
function isResultSet(x) {
|
|
2322
|
-
return hasPrototypeFlag(x, "isResultSet");
|
|
2323
|
-
}
|
|
2324
|
-
function isHelp(x) {
|
|
2325
|
-
return hasPrototypeFlag(x, "isHelp");
|
|
2326
|
-
}
|
|
2327
2321
|
function isFunction(x) {
|
|
2328
2322
|
return typeof x === "function";
|
|
2329
2323
|
}
|
|
@@ -2343,75 +2337,12 @@ function isMap(object) {
|
|
|
2343
2337
|
const o = object;
|
|
2344
2338
|
return object instanceof Map || typeof o.set === "function" && typeof o.get === "function" && typeof o.keys === "function" && typeof o.has === "function";
|
|
2345
2339
|
}
|
|
2346
|
-
function isPartitionedMap(object) {
|
|
2347
|
-
const pm = object;
|
|
2348
|
-
return isMap(object) && isMap(pm.a) && isMap(pm.b);
|
|
2349
|
-
}
|
|
2350
|
-
function isObjectWrappingMap(object) {
|
|
2351
|
-
if (!isMap(object)) return false;
|
|
2352
|
-
const wrapper = object;
|
|
2353
|
-
return wrapper[Symbol.toStringTag] === "ObjectWrappingMap" && isObject(wrapper.wrappedObject);
|
|
2354
|
-
}
|
|
2355
2340
|
function isNull(x) {
|
|
2356
2341
|
return x === null;
|
|
2357
2342
|
}
|
|
2358
2343
|
function isUndefined(x) {
|
|
2359
2344
|
return x === void 0;
|
|
2360
2345
|
}
|
|
2361
|
-
function isAccessorNode(x) {
|
|
2362
|
-
return hasOwnAndPrototypeFlag(x, "isAccessorNode", "isNode");
|
|
2363
|
-
}
|
|
2364
|
-
function isArrayNode(x) {
|
|
2365
|
-
return hasOwnAndPrototypeFlag(x, "isArrayNode", "isNode");
|
|
2366
|
-
}
|
|
2367
|
-
function isAssignmentNode(x) {
|
|
2368
|
-
return hasOwnAndPrototypeFlag(x, "isAssignmentNode", "isNode");
|
|
2369
|
-
}
|
|
2370
|
-
function isBlockNode(x) {
|
|
2371
|
-
return hasOwnAndPrototypeFlag(x, "isBlockNode", "isNode");
|
|
2372
|
-
}
|
|
2373
|
-
function isConditionalNode(x) {
|
|
2374
|
-
return hasOwnAndPrototypeFlag(x, "isConditionalNode", "isNode");
|
|
2375
|
-
}
|
|
2376
|
-
function isConstantNode(x) {
|
|
2377
|
-
return hasOwnAndPrototypeFlag(x, "isConstantNode", "isNode");
|
|
2378
|
-
}
|
|
2379
|
-
function rule2Node(node) {
|
|
2380
|
-
return isConstantNode(node) || isOperatorNode(node) && node.args.length === 1 && isConstantNode(node.args[0]) && "-+~".includes(node.op);
|
|
2381
|
-
}
|
|
2382
|
-
function isFunctionAssignmentNode(x) {
|
|
2383
|
-
return hasOwnAndPrototypeFlag(x, "isFunctionAssignmentNode", "isNode");
|
|
2384
|
-
}
|
|
2385
|
-
function isFunctionNode(x) {
|
|
2386
|
-
return hasOwnAndPrototypeFlag(x, "isFunctionNode", "isNode");
|
|
2387
|
-
}
|
|
2388
|
-
function isIndexNode(x) {
|
|
2389
|
-
return hasOwnAndPrototypeFlag(x, "isIndexNode", "isNode");
|
|
2390
|
-
}
|
|
2391
|
-
function isNode(x) {
|
|
2392
|
-
return hasOwnAndPrototypeFlag(x, "isNode", "isNode");
|
|
2393
|
-
}
|
|
2394
|
-
function isObjectNode(x) {
|
|
2395
|
-
return hasOwnAndPrototypeFlag(x, "isObjectNode", "isNode");
|
|
2396
|
-
}
|
|
2397
|
-
function isOperatorNode(x) {
|
|
2398
|
-
return hasOwnAndPrototypeFlag(x, "isOperatorNode", "isNode");
|
|
2399
|
-
}
|
|
2400
|
-
function isParenthesisNode(x) {
|
|
2401
|
-
return hasOwnAndPrototypeFlag(x, "isParenthesisNode", "isNode");
|
|
2402
|
-
}
|
|
2403
|
-
function isRangeNode(x) {
|
|
2404
|
-
return hasOwnAndPrototypeFlag(x, "isRangeNode", "isNode");
|
|
2405
|
-
}
|
|
2406
|
-
function isRelationalNode(x) {
|
|
2407
|
-
return hasOwnAndPrototypeFlag(x, "isRelationalNode", "isNode");
|
|
2408
|
-
}
|
|
2409
|
-
function isSymbolNode(x) {
|
|
2410
|
-
return hasOwnAndPrototypeFlag(x, "isSymbolNode", "isNode");
|
|
2411
|
-
}
|
|
2412
|
-
function isChain(x) {
|
|
2413
|
-
return hasPrototypeFlag(x, "isChain");
|
|
2414
|
-
}
|
|
2415
2346
|
function typeOf(x) {
|
|
2416
2347
|
const t = typeof x;
|
|
2417
2348
|
if (t === "object") {
|
|
@@ -4421,6 +4352,19 @@ var createUnitClass = /* @__PURE__ */ factory(
|
|
|
4421
4352
|
PREFIXES.SHORTLONG = Object.assign({}, PREFIXES.SHORT, PREFIXES.LONG);
|
|
4422
4353
|
PREFIXES.BINARY_SHORT = Object.assign({}, PREFIXES.BINARY_SHORT_SI, PREFIXES.BINARY_SHORT_IEC);
|
|
4423
4354
|
PREFIXES.BINARY_LONG = Object.assign({}, PREFIXES.BINARY_LONG_SI, PREFIXES.BINARY_LONG_IEC);
|
|
4355
|
+
PREFIXES.SHORT_UP_ONLY = {
|
|
4356
|
+
"": { name: "", value: 1, scientific: true },
|
|
4357
|
+
k: { name: "k", value: 1e3, scientific: true },
|
|
4358
|
+
M: { name: "M", value: 1e6, scientific: true },
|
|
4359
|
+
G: { name: "G", value: 1e9, scientific: true },
|
|
4360
|
+
T: { name: "T", value: 1e12, scientific: true },
|
|
4361
|
+
P: { name: "P", value: 1e15, scientific: true },
|
|
4362
|
+
E: { name: "E", value: 1e18, scientific: true },
|
|
4363
|
+
Z: { name: "Z", value: 1e21, scientific: true },
|
|
4364
|
+
Y: { name: "Y", value: 1e24, scientific: true },
|
|
4365
|
+
R: { name: "R", value: 1e27, scientific: true },
|
|
4366
|
+
Q: { name: "Q", value: 1e30, scientific: true }
|
|
4367
|
+
};
|
|
4424
4368
|
const BASE_DIMENSIONS = [
|
|
4425
4369
|
"MASS",
|
|
4426
4370
|
"LENGTH",
|
|
@@ -4587,6 +4531,89 @@ var createUnitClass = /* @__PURE__ */ factory(
|
|
|
4587
4531
|
value: 1e-10,
|
|
4588
4532
|
offset: 0
|
|
4589
4533
|
},
|
|
4534
|
+
// Astronomical / nautical / typography length units (ported from
|
|
4535
|
+
// upstream mathjs ece1aab0f + 5f360326b — B-5). `ly` and `pc` are
|
|
4536
|
+
// first-class UNITS with SHORT_UP_ONLY prefixes so kpc/Mpc/Mly/Gly
|
|
4537
|
+
// resolve through the prefix system while sub-multiples throw.
|
|
4538
|
+
astronomicalUnit: {
|
|
4539
|
+
name: "astronomicalUnit",
|
|
4540
|
+
base: BASE_UNITS.LENGTH,
|
|
4541
|
+
prefixes: PREFIXES.NONE,
|
|
4542
|
+
value: 149597870700,
|
|
4543
|
+
// IAU 2012 exact definition
|
|
4544
|
+
offset: 0
|
|
4545
|
+
},
|
|
4546
|
+
lightyear: {
|
|
4547
|
+
name: "lightyear",
|
|
4548
|
+
base: BASE_UNITS.LENGTH,
|
|
4549
|
+
prefixes: PREFIXES.NONE,
|
|
4550
|
+
value: 9460730472580800,
|
|
4551
|
+
// Julian year × c (exact)
|
|
4552
|
+
offset: 0
|
|
4553
|
+
},
|
|
4554
|
+
ly: {
|
|
4555
|
+
name: "ly",
|
|
4556
|
+
base: BASE_UNITS.LENGTH,
|
|
4557
|
+
prefixes: PREFIXES.SHORT_UP_ONLY,
|
|
4558
|
+
value: 9460730472580800,
|
|
4559
|
+
offset: 0
|
|
4560
|
+
},
|
|
4561
|
+
parsec: {
|
|
4562
|
+
name: "parsec",
|
|
4563
|
+
base: BASE_UNITS.LENGTH,
|
|
4564
|
+
prefixes: PREFIXES.LONG,
|
|
4565
|
+
// kiloparsec, megaparsec, gigaparsec
|
|
4566
|
+
value: 30856775814913700,
|
|
4567
|
+
// IAU 2015 exact definition
|
|
4568
|
+
offset: 0
|
|
4569
|
+
},
|
|
4570
|
+
pc: {
|
|
4571
|
+
name: "pc",
|
|
4572
|
+
base: BASE_UNITS.LENGTH,
|
|
4573
|
+
prefixes: PREFIXES.SHORT_UP_ONLY,
|
|
4574
|
+
value: 30856775814913700,
|
|
4575
|
+
offset: 0
|
|
4576
|
+
},
|
|
4577
|
+
nauticalMile: {
|
|
4578
|
+
name: "nauticalMile",
|
|
4579
|
+
base: BASE_UNITS.LENGTH,
|
|
4580
|
+
prefixes: PREFIXES.NONE,
|
|
4581
|
+
value: 1852,
|
|
4582
|
+
// exact
|
|
4583
|
+
offset: 0
|
|
4584
|
+
},
|
|
4585
|
+
fathom: {
|
|
4586
|
+
name: "fathom",
|
|
4587
|
+
base: BASE_UNITS.LENGTH,
|
|
4588
|
+
prefixes: PREFIXES.NONE,
|
|
4589
|
+
value: 1.8288,
|
|
4590
|
+
// 6 ft exactly
|
|
4591
|
+
offset: 0
|
|
4592
|
+
},
|
|
4593
|
+
furlong: {
|
|
4594
|
+
name: "furlong",
|
|
4595
|
+
base: BASE_UNITS.LENGTH,
|
|
4596
|
+
prefixes: PREFIXES.NONE,
|
|
4597
|
+
value: 201.168,
|
|
4598
|
+
// 1/8 mile exactly
|
|
4599
|
+
offset: 0
|
|
4600
|
+
},
|
|
4601
|
+
point: {
|
|
4602
|
+
name: "point",
|
|
4603
|
+
base: BASE_UNITS.LENGTH,
|
|
4604
|
+
prefixes: PREFIXES.NONE,
|
|
4605
|
+
value: 0.0254 / 72,
|
|
4606
|
+
// 1/72 inch (PostScript), exact
|
|
4607
|
+
offset: 0
|
|
4608
|
+
},
|
|
4609
|
+
pica: {
|
|
4610
|
+
name: "pica",
|
|
4611
|
+
base: BASE_UNITS.LENGTH,
|
|
4612
|
+
prefixes: PREFIXES.NONE,
|
|
4613
|
+
value: 0.0254 / 6,
|
|
4614
|
+
// 1/6 inch (12 points), exact
|
|
4615
|
+
offset: 0
|
|
4616
|
+
},
|
|
4590
4617
|
m: {
|
|
4591
4618
|
name: "m",
|
|
4592
4619
|
base: BASE_UNITS.LENGTH,
|
|
@@ -5699,6 +5726,19 @@ var createUnitClass = /* @__PURE__ */ factory(
|
|
|
5699
5726
|
};
|
|
5700
5727
|
const ALIASES = {
|
|
5701
5728
|
meters: "meter",
|
|
5729
|
+
// Astronomical / nautical / typography aliases (B-5 port). Lowercase
|
|
5730
|
+
// 'au' is deliberately ABSENT: it collides with the atomic unit of
|
|
5731
|
+
// length (Bohr radius, ~5.29e-11 m), 21 orders of magnitude smaller.
|
|
5732
|
+
AU: "astronomicalUnit",
|
|
5733
|
+
astronomicalUnits: "astronomicalUnit",
|
|
5734
|
+
lightyears: "lightyear",
|
|
5735
|
+
parsecs: "parsec",
|
|
5736
|
+
nmi: "nauticalMile",
|
|
5737
|
+
nauticalMiles: "nauticalMile",
|
|
5738
|
+
fathoms: "fathom",
|
|
5739
|
+
furlongs: "furlong",
|
|
5740
|
+
points: "point",
|
|
5741
|
+
picas: "pica",
|
|
5702
5742
|
inches: "inch",
|
|
5703
5743
|
feet: "foot",
|
|
5704
5744
|
yards: "yard",
|
|
@@ -6256,35 +6296,13 @@ export {
|
|
|
6256
6296
|
isRange,
|
|
6257
6297
|
isIndex,
|
|
6258
6298
|
isBoolean,
|
|
6259
|
-
isResultSet,
|
|
6260
|
-
isHelp,
|
|
6261
6299
|
isFunction,
|
|
6262
6300
|
isDate,
|
|
6263
6301
|
isRegExp,
|
|
6264
6302
|
isObject,
|
|
6265
6303
|
isMap,
|
|
6266
|
-
isPartitionedMap,
|
|
6267
|
-
isObjectWrappingMap,
|
|
6268
6304
|
isNull,
|
|
6269
6305
|
isUndefined,
|
|
6270
|
-
isAccessorNode,
|
|
6271
|
-
isArrayNode,
|
|
6272
|
-
isAssignmentNode,
|
|
6273
|
-
isBlockNode,
|
|
6274
|
-
isConditionalNode,
|
|
6275
|
-
isConstantNode,
|
|
6276
|
-
rule2Node,
|
|
6277
|
-
isFunctionAssignmentNode,
|
|
6278
|
-
isFunctionNode,
|
|
6279
|
-
isIndexNode,
|
|
6280
|
-
isNode,
|
|
6281
|
-
isObjectNode,
|
|
6282
|
-
isOperatorNode,
|
|
6283
|
-
isParenthesisNode,
|
|
6284
|
-
isRangeNode,
|
|
6285
|
-
isRelationalNode,
|
|
6286
|
-
isSymbolNode,
|
|
6287
|
-
isChain,
|
|
6288
6306
|
typeOf,
|
|
6289
6307
|
isInteger,
|
|
6290
6308
|
safeNumberType,
|
|
@@ -63,87 +63,6 @@ interface Index {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
interface ResultSet {
|
|
67
|
-
entries: unknown[];
|
|
68
|
-
constructor: {
|
|
69
|
-
prototype: {
|
|
70
|
-
isResultSet: boolean;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
interface Help {
|
|
75
|
-
constructor: {
|
|
76
|
-
prototype: {
|
|
77
|
-
isHelp: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
interface Chain {
|
|
82
|
-
constructor: {
|
|
83
|
-
prototype: {
|
|
84
|
-
isChain: boolean;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
interface Node {
|
|
89
|
-
isNode: boolean;
|
|
90
|
-
constructor: {
|
|
91
|
-
prototype: {
|
|
92
|
-
isNode: boolean;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
interface AccessorNode extends Node {
|
|
97
|
-
isAccessorNode: boolean;
|
|
98
|
-
}
|
|
99
|
-
interface ArrayNode extends Node {
|
|
100
|
-
isArrayNode: boolean;
|
|
101
|
-
}
|
|
102
|
-
interface AssignmentNode extends Node {
|
|
103
|
-
isAssignmentNode: boolean;
|
|
104
|
-
}
|
|
105
|
-
interface BlockNode extends Node {
|
|
106
|
-
isBlockNode: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface ConditionalNode extends Node {
|
|
109
|
-
isConditionalNode: boolean;
|
|
110
|
-
}
|
|
111
|
-
interface ConstantNode extends Node {
|
|
112
|
-
isConstantNode: boolean;
|
|
113
|
-
}
|
|
114
|
-
interface FunctionAssignmentNode extends Node {
|
|
115
|
-
isFunctionAssignmentNode: boolean;
|
|
116
|
-
}
|
|
117
|
-
interface FunctionNode extends Node {
|
|
118
|
-
isFunctionNode: boolean;
|
|
119
|
-
}
|
|
120
|
-
interface IndexNode extends Node {
|
|
121
|
-
isIndexNode: boolean;
|
|
122
|
-
}
|
|
123
|
-
interface ObjectNode extends Node {
|
|
124
|
-
isObjectNode: boolean;
|
|
125
|
-
}
|
|
126
|
-
interface OperatorNode extends Node {
|
|
127
|
-
isOperatorNode: boolean;
|
|
128
|
-
op: string;
|
|
129
|
-
args: Node[];
|
|
130
|
-
}
|
|
131
|
-
interface ParenthesisNode extends Node {
|
|
132
|
-
isParenthesisNode: boolean;
|
|
133
|
-
}
|
|
134
|
-
interface RangeNode extends Node {
|
|
135
|
-
isRangeNode: boolean;
|
|
136
|
-
}
|
|
137
|
-
interface RelationalNode extends Node {
|
|
138
|
-
isRelationalNode: boolean;
|
|
139
|
-
}
|
|
140
|
-
interface SymbolNode extends Node {
|
|
141
|
-
isSymbolNode: boolean;
|
|
142
|
-
}
|
|
143
|
-
interface PartitionedMap {
|
|
144
|
-
a: Map<unknown, unknown>;
|
|
145
|
-
b: Map<unknown, unknown>;
|
|
146
|
-
}
|
|
147
66
|
declare function isNumber(x: unknown): x is number;
|
|
148
67
|
declare function isBigNumber(x: unknown): x is BigNumber;
|
|
149
68
|
declare function isBigInt(x: unknown): x is bigint;
|
|
@@ -164,8 +83,6 @@ declare function isSparseMatrix(x: unknown): x is SparseMatrix;
|
|
|
164
83
|
declare function isRange(x: unknown): x is Range;
|
|
165
84
|
declare function isIndex(x: unknown): x is Index;
|
|
166
85
|
declare function isBoolean(x: unknown): x is boolean;
|
|
167
|
-
declare function isResultSet(x: unknown): x is ResultSet;
|
|
168
|
-
declare function isHelp(x: unknown): x is Help;
|
|
169
86
|
declare function isFunction(x: unknown): x is (...args: unknown[]) => unknown;
|
|
170
87
|
declare function isDate(x: unknown): x is Date;
|
|
171
88
|
declare function isRegExp(x: unknown): x is RegExp;
|
|
@@ -179,28 +96,8 @@ declare function isObject(x: unknown): x is Record<string, unknown>;
|
|
|
179
96
|
* @returns
|
|
180
97
|
*/
|
|
181
98
|
declare function isMap(object: unknown): object is Map<unknown, unknown>;
|
|
182
|
-
declare function isPartitionedMap(object: unknown): object is PartitionedMap;
|
|
183
|
-
declare function isObjectWrappingMap(object: unknown): boolean;
|
|
184
99
|
declare function isNull(x: unknown): x is null;
|
|
185
100
|
declare function isUndefined(x: unknown): x is undefined;
|
|
186
|
-
declare function isAccessorNode(x: unknown): x is AccessorNode;
|
|
187
|
-
declare function isArrayNode(x: unknown): x is ArrayNode;
|
|
188
|
-
declare function isAssignmentNode(x: unknown): x is AssignmentNode;
|
|
189
|
-
declare function isBlockNode(x: unknown): x is BlockNode;
|
|
190
|
-
declare function isConditionalNode(x: unknown): x is ConditionalNode;
|
|
191
|
-
declare function isConstantNode(x: unknown): x is ConstantNode;
|
|
192
|
-
declare function rule2Node(node: Node): boolean;
|
|
193
|
-
declare function isFunctionAssignmentNode(x: unknown): x is FunctionAssignmentNode;
|
|
194
|
-
declare function isFunctionNode(x: unknown): x is FunctionNode;
|
|
195
|
-
declare function isIndexNode(x: unknown): x is IndexNode;
|
|
196
|
-
declare function isNode(x: unknown): x is Node;
|
|
197
|
-
declare function isObjectNode(x: unknown): x is ObjectNode;
|
|
198
|
-
declare function isOperatorNode(x: unknown): x is OperatorNode;
|
|
199
|
-
declare function isParenthesisNode(x: unknown): x is ParenthesisNode;
|
|
200
|
-
declare function isRangeNode(x: unknown): x is RangeNode;
|
|
201
|
-
declare function isRelationalNode(x: unknown): x is RelationalNode;
|
|
202
|
-
declare function isSymbolNode(x: unknown): x is SymbolNode;
|
|
203
|
-
declare function isChain(x: unknown): x is Chain;
|
|
204
101
|
declare function typeOf(x: unknown): string;
|
|
205
102
|
|
|
206
103
|
/**
|
|
@@ -437,4 +334,4 @@ interface UnitConstructor {
|
|
|
437
334
|
/** The core `Unit` class, pre-wired to core's numeric primitives. */
|
|
438
335
|
declare const Unit: UnitConstructor;
|
|
439
336
|
|
|
440
|
-
export {
|
|
337
|
+
export { isNull as $, type UnitSystem as A, type BaseUnitDef as B, type Complex as C, type DenseMatrix as D, type UnitSystemEntry as E, type Fraction as F, isArray as G, isBigInt as H, type Index as I, isBigNumber as J, isBoolean as K, isCollection as L, type Matrix as M, type Numeric as N, isComplex as O, type ParseOptions as P, isDate as Q, type Range as R, type ScalarBinaryOp as S, type TypeConverters as T, Unit as U, isDenseMatrix as V, isFraction as W, isFunction as X, isIndex as Y, isMap as Z, isMatrix as _, type UnitInstance as a, isNumber as a0, isObject as a1, isRange as a2, isRegExp as a3, isSparseMatrix as a4, isString as a5, isUndefined as a6, typeOf as a7, type UnitConstructor as b, type UnitDependencies as c, type BigNumber as d, type BigNumberConstructor as e, type BigNumberValue as f, type ComplexConstructor as g, type ComplexValue as h, isUnit as i, type ConverterFn as j, type CreateUnitDefObject as k, type CreateUnitOptions as l, type FractionConstructor as m, type FractionValue as n, type IndexDimension as o, type PrefixDef as p, type PrefixTable as q, type ScalarUnaryOp as r, type SparseMatrix as s, type SubtractScalar as t, type Unit$1 as u, type UnitComponent as v, type UnitConfig as w, type UnitDef as x, type UnitFormatOptions as y, type UnitJSON as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { U as Unit, a as UnitInstance, i as isUnitValue } from './index-
|
|
1
|
+
export { U as Unit, a as UnitInstance, i as isUnitValue } from './index-DpOizJsa.js';
|
|
2
2
|
import { TypedInstance, ReferTo, ReferToSelf, TypedFunction, SignatureFunction } from 'typed-function';
|
|
3
3
|
export { ReferTo, ReferToSelf, SignatureFunction, TypedFunction, TypedInstance, create, default as typed } from 'typed-function';
|
|
4
4
|
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
pow,
|
|
39
39
|
round,
|
|
40
40
|
subtractScalar
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-BDNTTHO4.js";
|
|
42
42
|
|
|
43
43
|
// src/types/dual-rules.ts
|
|
44
44
|
var DUAL_UNARY_RULES = {
|
|
@@ -376,9 +376,6 @@ var SI_PREFIXES = {
|
|
|
376
376
|
y: 1e-24
|
|
377
377
|
// yocto
|
|
378
378
|
};
|
|
379
|
-
var SI_PREFIX_KEYS = Object.keys(SI_PREFIXES).sort(
|
|
380
|
-
(a, b) => b.length - a.length
|
|
381
|
-
);
|
|
382
379
|
var BEST_PREFIXES = [
|
|
383
380
|
"Y",
|
|
384
381
|
"Z",
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as UnitConstructor, c as UnitDependencies } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { b as UnitConstructor, c as UnitDependencies } from './index-DpOizJsa.js';
|
|
2
|
+
export { B as BaseUnitDef, d as BigNumber, e as BigNumberConstructor, f as BigNumberValue, C as Complex, g as ComplexConstructor, h as ComplexValue, j as ConverterFn, U as CoreUnit, k as CreateUnitDefObject, l as CreateUnitOptions, D as DenseMatrix, F as Fraction, m as FractionConstructor, n as FractionValue, I as Index, o as IndexDimension, M as Matrix, N as Numeric, P as ParseOptions, p as PrefixDef, q as PrefixTable, R as Range, S as ScalarBinaryOp, r as ScalarUnaryOp, s as SparseMatrix, t as SubtractScalar, T as TypeConverters, u as Unit, v as UnitComponent, w as UnitConfig, x as UnitDef, y as UnitFormatOptions, a as UnitInstance, z as UnitJSON, A as UnitSystem, E as UnitSystemEntry, G as isArray, H as isBigInt, J as isBigNumber, K as isBoolean, L as isCollection, O as isComplex, Q as isDate, V as isDenseMatrix, W as isFraction, X as isFunction, Y as isIndex, Z as isMap, _ as isMatrix, $ as isNull, a0 as isNumber, a1 as isObject, a2 as isRange, a3 as isRegExp, a4 as isSparseMatrix, a5 as isString, a6 as isUndefined, i as isUnit, a7 as typeOf } from './index-DpOizJsa.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Type for a factory function that creates instances
|
package/dist/internal.js
CHANGED
|
@@ -19,50 +19,29 @@ import {
|
|
|
19
19
|
format,
|
|
20
20
|
get,
|
|
21
21
|
hasOwnProperty,
|
|
22
|
-
isAccessorNode,
|
|
23
22
|
isArray,
|
|
24
|
-
isArrayNode,
|
|
25
|
-
isAssignmentNode,
|
|
26
23
|
isBigInt,
|
|
27
24
|
isBigNumber2 as isBigNumber,
|
|
28
|
-
isBlockNode,
|
|
29
25
|
isBoolean,
|
|
30
|
-
isChain,
|
|
31
26
|
isCollection,
|
|
32
27
|
isComplex2 as isComplex,
|
|
33
|
-
isConditionalNode,
|
|
34
|
-
isConstantNode,
|
|
35
28
|
isDate,
|
|
36
29
|
isDenseMatrix,
|
|
37
30
|
isFraction2 as isFraction,
|
|
38
31
|
isFunction,
|
|
39
|
-
isFunctionAssignmentNode,
|
|
40
|
-
isFunctionNode,
|
|
41
|
-
isHelp,
|
|
42
32
|
isIndex,
|
|
43
|
-
isIndexNode,
|
|
44
33
|
isInteger,
|
|
45
34
|
isLegacyFactory,
|
|
46
35
|
isMap,
|
|
47
36
|
isMatrix,
|
|
48
|
-
isNode,
|
|
49
37
|
isNull,
|
|
50
38
|
isNumber,
|
|
51
39
|
isObject,
|
|
52
|
-
isObjectNode,
|
|
53
|
-
isObjectWrappingMap,
|
|
54
|
-
isOperatorNode,
|
|
55
|
-
isParenthesisNode,
|
|
56
|
-
isPartitionedMap,
|
|
57
40
|
isPowZeroAtInfinity,
|
|
58
41
|
isRange,
|
|
59
|
-
isRangeNode,
|
|
60
42
|
isRegExp,
|
|
61
|
-
isRelationalNode,
|
|
62
|
-
isResultSet,
|
|
63
43
|
isSparseMatrix,
|
|
64
44
|
isString,
|
|
65
|
-
isSymbolNode,
|
|
66
45
|
isUndefined,
|
|
67
46
|
isUnit,
|
|
68
47
|
lazy,
|
|
@@ -76,7 +55,6 @@ import {
|
|
|
76
55
|
pick,
|
|
77
56
|
pickShallow,
|
|
78
57
|
roundDigits,
|
|
79
|
-
rule2Node,
|
|
80
58
|
safeNumberType,
|
|
81
59
|
set,
|
|
82
60
|
sign,
|
|
@@ -91,7 +69,7 @@ import {
|
|
|
91
69
|
typeOf,
|
|
92
70
|
unitDependencies,
|
|
93
71
|
warnOnce
|
|
94
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-BDNTTHO4.js";
|
|
95
73
|
export {
|
|
96
74
|
Unit as CoreUnit,
|
|
97
75
|
acosh,
|
|
@@ -113,50 +91,29 @@ export {
|
|
|
113
91
|
format,
|
|
114
92
|
get,
|
|
115
93
|
hasOwnProperty,
|
|
116
|
-
isAccessorNode,
|
|
117
94
|
isArray,
|
|
118
|
-
isArrayNode,
|
|
119
|
-
isAssignmentNode,
|
|
120
95
|
isBigInt,
|
|
121
96
|
isBigNumber,
|
|
122
|
-
isBlockNode,
|
|
123
97
|
isBoolean,
|
|
124
|
-
isChain,
|
|
125
98
|
isCollection,
|
|
126
99
|
isComplex,
|
|
127
|
-
isConditionalNode,
|
|
128
|
-
isConstantNode,
|
|
129
100
|
isDate,
|
|
130
101
|
isDenseMatrix,
|
|
131
102
|
isFraction,
|
|
132
103
|
isFunction,
|
|
133
|
-
isFunctionAssignmentNode,
|
|
134
|
-
isFunctionNode,
|
|
135
|
-
isHelp,
|
|
136
104
|
isIndex,
|
|
137
|
-
isIndexNode,
|
|
138
105
|
isInteger,
|
|
139
106
|
isLegacyFactory,
|
|
140
107
|
isMap,
|
|
141
108
|
isMatrix,
|
|
142
|
-
isNode,
|
|
143
109
|
isNull,
|
|
144
110
|
isNumber,
|
|
145
111
|
isObject,
|
|
146
|
-
isObjectNode,
|
|
147
|
-
isObjectWrappingMap,
|
|
148
|
-
isOperatorNode,
|
|
149
|
-
isParenthesisNode,
|
|
150
|
-
isPartitionedMap,
|
|
151
112
|
isPowZeroAtInfinity,
|
|
152
113
|
isRange,
|
|
153
|
-
isRangeNode,
|
|
154
114
|
isRegExp,
|
|
155
|
-
isRelationalNode,
|
|
156
|
-
isResultSet,
|
|
157
115
|
isSparseMatrix,
|
|
158
116
|
isString,
|
|
159
|
-
isSymbolNode,
|
|
160
117
|
isUndefined,
|
|
161
118
|
isUnit,
|
|
162
119
|
lazy,
|
|
@@ -170,7 +127,6 @@ export {
|
|
|
170
127
|
pick,
|
|
171
128
|
pickShallow,
|
|
172
129
|
roundDigits,
|
|
173
|
-
rule2Node,
|
|
174
130
|
safeNumberType,
|
|
175
131
|
set,
|
|
176
132
|
sign,
|