mathjs 9.5.2 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/HISTORY.md +15 -1
- package/lib/browser/math.js +4 -4
- package/lib/browser/math.js.map +1 -1
- package/lib/cjs/constants.js +1 -1
- package/lib/cjs/core/function/config.js +1 -1
- package/lib/cjs/core/function/import.js +2 -1
- package/lib/cjs/entry/dependenciesAny.generated.js +999 -999
- package/lib/cjs/entry/dependenciesNumber.generated.js +581 -581
- package/lib/cjs/entry/impureFunctionsAny.generated.js +314 -313
- package/lib/cjs/entry/impureFunctionsNumber.generated.js +223 -222
- package/lib/cjs/entry/mainAny.js +8 -8
- package/lib/cjs/entry/mainNumber.js +8 -8
- package/lib/cjs/entry/pureFunctionsAny.generated.js +1100 -1100
- package/lib/cjs/entry/pureFunctionsNumber.generated.js +375 -375
- package/lib/cjs/entry/typeChecks.js +12 -12
- package/lib/cjs/expression/operators.js +1 -1
- package/lib/cjs/factoriesAny.js +660 -660
- package/lib/cjs/factoriesNumber.js +268 -237
- package/lib/cjs/header.js +1 -1
- package/lib/cjs/plain/bignumber/arithmetic.js +2 -2
- package/lib/cjs/plain/number/arithmetic.js +10 -10
- package/lib/cjs/plain/number/constants.js +1 -1
- package/lib/cjs/plain/number/logical.js +1 -1
- package/lib/cjs/plain/number/probability.js +2 -1
- package/lib/cjs/plain/number/trigonometry.js +1 -1
- package/lib/cjs/plain/number/utils.js +1 -1
- package/lib/cjs/type/unit/physicalConstants.js +1 -1
- package/lib/cjs/utils/array.js +14 -14
- package/lib/cjs/utils/bignumber/bitwise.js +1 -1
- package/lib/cjs/utils/customs.js +5 -5
- package/lib/cjs/utils/factory.js +3 -3
- package/lib/cjs/utils/function.js +1 -1
- package/lib/cjs/utils/is.js +23 -23
- package/lib/cjs/utils/latex.js +2 -1
- package/lib/cjs/utils/map.js +3 -3
- package/lib/cjs/utils/noop.js +1 -1
- package/lib/cjs/utils/number.js +10 -6
- package/lib/cjs/utils/object.js +8 -8
- package/lib/cjs/utils/snapshot.js +1 -1
- package/lib/cjs/utils/string.js +2 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/core/function/import.js +2 -1
- package/lib/esm/entry/dependenciesAny.generated.js +270 -270
- package/lib/esm/entry/dependenciesNumber.generated.js +163 -163
- package/lib/esm/entry/impureFunctionsAny.generated.js +301 -301
- package/lib/esm/entry/impureFunctionsNumber.generated.js +211 -211
- package/lib/esm/entry/pureFunctionsAny.generated.js +816 -816
- package/lib/esm/entry/pureFunctionsNumber.generated.js +234 -234
- package/lib/esm/version.js +1 -1
- package/package.json +16 -16
- package/types/index.d.ts +250 -71
package/lib/cjs/constants.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.createVersion = exports.
|
6
|
+
exports.createVersion = exports.createUppercasePi = exports.createUppercaseE = exports.createTrue = exports.createTau = exports.createSQRT2 = exports.createSQRT1_2 = exports.createPi = exports.createPhi = exports.createNull = exports.createNaN = exports.createLOG2E = exports.createLOG10E = exports.createLN2 = exports.createLN10 = exports.createInfinity = exports.createI = exports.createFalse = exports.createE = void 0;
|
7
7
|
|
8
8
|
var _factory = require("./utils/factory.js");
|
9
9
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.configFactory = configFactory;
|
7
6
|
exports.NUMBER_OPTIONS = exports.MATRIX_OPTIONS = void 0;
|
7
|
+
exports.configFactory = configFactory;
|
8
8
|
|
9
9
|
var _object = require("../../utils/object.js");
|
10
10
|
|
@@ -100,7 +100,8 @@ function importFactory(typed, load, math, importedFactories) {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
} else if ((0, _factory.isFactory)(value) || name !== undefined) {
|
103
|
-
var flatName = (0, _factory.isFactory)(value) ? isTransformFunctionFactory(value) ? value.fn + '.transform'
|
103
|
+
var flatName = (0, _factory.isFactory)(value) ? isTransformFunctionFactory(value) ? value.fn + '.transform' // TODO: this is ugly
|
104
|
+
: value.fn : name; // we allow importing the same function twice if it points to the same implementation
|
104
105
|
|
105
106
|
if ((0, _object.hasOwnProperty)(flatValues, flatName) && flatValues[flatName] !== value && !options.silent) {
|
106
107
|
throw new Error('Cannot import "' + flatName + '" twice');
|