mathjs 10.6.3 → 10.6.4

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.
@@ -43,19 +43,19 @@ var createCeilNumber = /* #__PURE__ */(0, _factory.factory)(name, ['typed', 'con
43
43
  if ((0, _number.nearlyEqual)(x, round(x, n), config.epsilon)) {
44
44
  return round(x, n);
45
45
  } else {
46
- var _$split = "".concat(x, "e").split('e'),
47
- _$split2 = (0, _slicedToArray2.default)(_$split, 2),
48
- number = _$split2[0],
49
- exponent = _$split2[1];
46
+ var _split = "".concat(x, "e").split('e'),
47
+ _split2 = (0, _slicedToArray2.default)(_split, 2),
48
+ number = _split2[0],
49
+ exponent = _split2[1];
50
50
 
51
51
  var result = Math.ceil(Number("".concat(number, "e").concat(Number(exponent) + n)));
52
52
 
53
- var _$split3 = "".concat(result, "e").split('e');
53
+ var _split3 = "".concat(result, "e").split('e');
54
54
 
55
- var _$split4 = (0, _slicedToArray2.default)(_$split3, 2);
55
+ var _split4 = (0, _slicedToArray2.default)(_split3, 2);
56
56
 
57
- number = _$split4[0];
58
- exponent = _$split4[1];
57
+ number = _split4[0];
58
+ exponent = _split4[1];
59
59
  return Number("".concat(number, "e").concat(Number(exponent) - n));
60
60
  }
61
61
  }
@@ -43,19 +43,19 @@ var createFloorNumber = /* #__PURE__ */(0, _factory.factory)(name, ['typed', 'co
43
43
  if ((0, _number.nearlyEqual)(x, round(x, n), config.epsilon)) {
44
44
  return round(x, n);
45
45
  } else {
46
- var _$split = "".concat(x, "e").split('e'),
47
- _$split2 = (0, _slicedToArray2.default)(_$split, 2),
48
- number = _$split2[0],
49
- exponent = _$split2[1];
46
+ var _split = "".concat(x, "e").split('e'),
47
+ _split2 = (0, _slicedToArray2.default)(_split, 2),
48
+ number = _split2[0],
49
+ exponent = _split2[1];
50
50
 
51
51
  var result = Math.floor(Number("".concat(number, "e").concat(Number(exponent) + n)));
52
52
 
53
- var _$split3 = "".concat(result, "e").split('e');
53
+ var _split3 = "".concat(result, "e").split('e');
54
54
 
55
- var _$split4 = (0, _slicedToArray2.default)(_$split3, 2);
55
+ var _split4 = (0, _slicedToArray2.default)(_split3, 2);
56
56
 
57
- number = _$split4[0];
58
- exponent = _$split4[1];
57
+ number = _split4[0];
58
+ exponent = _split4[1];
59
59
  return Number("".concat(number, "e").concat(Number(exponent) - n));
60
60
  }
61
61
  }
package/lib/cjs/header.js CHANGED
@@ -6,8 +6,8 @@
6
6
  * It features real and complex numbers, units, matrices, a large set of
7
7
  * mathematical functions, and a flexible expression parser.
8
8
  *
9
- * @version 10.6.3
10
- * @date 2022-06-24
9
+ * @version 10.6.4
10
+ * @date 2022-06-28
11
11
  *
12
12
  * @license
13
13
  * Copyright (C) 2013-2022 Jos de Jong <wjosdejong@gmail.com>
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = '10.6.3'; // Note: This file is automatically generated when building math.js.
7
+ var version = '10.6.4'; // Note: This file is automatically generated when building math.js.
8
8
  // Changes made in this file will be overwritten.
9
9
 
10
10
  exports.version = version;
@@ -1,2 +1,2 @@
1
- export var version = '10.6.3'; // Note: This file is automatically generated when building math.js.
1
+ export var version = '10.6.4'; // Note: This file is automatically generated when building math.js.
2
2
  // Changes made in this file will be overwritten.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mathjs",
3
- "version": "10.6.3",
3
+ "version": "10.6.4",
4
4
  "description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.",
5
5
  "author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
6
6
  "homepage": "https://mathjs.org",
@@ -25,7 +25,7 @@
25
25
  "unit"
26
26
  ],
27
27
  "dependencies": {
28
- "@babel/runtime": "^7.18.3",
28
+ "@babel/runtime": "^7.18.6",
29
29
  "complex.js": "^2.1.1",
30
30
  "decimal.js": "^10.3.1",
31
31
  "escape-latex": "^1.2.0",
@@ -36,20 +36,20 @@
36
36
  "typed-function": "^2.1.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "7.18.5",
40
- "@babel/plugin-transform-object-assign": "7.16.7",
41
- "@babel/plugin-transform-runtime": "7.18.5",
42
- "@babel/preset-env": "7.18.2",
43
- "@babel/register": "7.17.7",
39
+ "@babel/core": "7.18.6",
40
+ "@babel/plugin-transform-object-assign": "7.18.6",
41
+ "@babel/plugin-transform-runtime": "7.18.6",
42
+ "@babel/preset-env": "7.18.6",
43
+ "@babel/register": "7.18.6",
44
44
  "@types/assert": "1.5.6",
45
45
  "@types/mocha": "9.1.1",
46
- "@typescript-eslint/eslint-plugin": "5.29.0",
47
- "@typescript-eslint/parser": "5.29.0",
46
+ "@typescript-eslint/eslint-plugin": "5.30.0",
47
+ "@typescript-eslint/parser": "5.30.0",
48
48
  "assert": "2.0.0",
49
49
  "babel-loader": "8.2.5",
50
50
  "benchmark": "2.1.4",
51
51
  "codecov": "3.8.3",
52
- "core-js": "3.23.2",
52
+ "core-js": "3.23.3",
53
53
  "del": "6.1.1",
54
54
  "dtslint": "4.2.1",
55
55
  "eslint": "8.18.0",
@@ -58,7 +58,7 @@
58
58
  "eslint-plugin-import": "2.26.0",
59
59
  "eslint-plugin-mocha": "10.0.5",
60
60
  "eslint-plugin-n": "15.2.3",
61
- "eslint-plugin-prettier": "4.0.0",
61
+ "eslint-plugin-prettier": "4.1.0",
62
62
  "eslint-plugin-promise": "6.0.0",
63
63
  "expect-type": "0.13.0",
64
64
  "expr-eval": "2.0.2",
package/types/index.d.ts CHANGED
@@ -161,6 +161,10 @@ declare namespace math {
161
161
  isHexDigit(c: string): boolean
162
162
  }
163
163
 
164
+ interface NodeCtor {
165
+ new (): MathNodeCommon
166
+ }
167
+
164
168
  interface AccessorNode extends MathNodeCommon {
165
169
  type: 'AccessorNode'
166
170
  isAccessorNode: true
@@ -434,6 +438,7 @@ declare namespace math {
434
438
  tau: number
435
439
 
436
440
  // Class-like constructors
441
+ Node: NodeCtor
437
442
  AccessorNode: AccessorNodeCtor
438
443
  ArrayNode: ArrayNodeCtor
439
444
  AssignmentNode: AssignmentNodeCtor
@@ -3288,10 +3293,12 @@ declare namespace math {
3288
3293
  factories: FactoryFunctionMap,
3289
3294
  config?: ConfigOptions
3290
3295
  ) => MathJsStatic
3291
- factory: <T>(
3296
+ factory: <T, TDeps extends readonly MathJsFunctionName[]>(
3292
3297
  name: string,
3293
- dependencies: MathJsFunctionName[],
3294
- create: (injected: Partial<MathJsStatic>) => T,
3298
+ dependencies: TDeps,
3299
+ create: (
3300
+ injected: Pick<MathJsStatic, Extract<MathJsFunctionName, TDeps[number]>>
3301
+ ) => T,
3295
3302
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3296
3303
  meta?: any
3297
3304
  ) => FactoryFunction<T>