mathjs 9.5.2 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/HISTORY.md +15 -1
  2. package/lib/browser/math.js +4 -4
  3. package/lib/browser/math.js.map +1 -1
  4. package/lib/cjs/constants.js +1 -1
  5. package/lib/cjs/core/function/config.js +1 -1
  6. package/lib/cjs/core/function/import.js +2 -1
  7. package/lib/cjs/entry/dependenciesAny.generated.js +999 -999
  8. package/lib/cjs/entry/dependenciesNumber.generated.js +581 -581
  9. package/lib/cjs/entry/impureFunctionsAny.generated.js +314 -313
  10. package/lib/cjs/entry/impureFunctionsNumber.generated.js +223 -222
  11. package/lib/cjs/entry/mainAny.js +8 -8
  12. package/lib/cjs/entry/mainNumber.js +8 -8
  13. package/lib/cjs/entry/pureFunctionsAny.generated.js +1100 -1100
  14. package/lib/cjs/entry/pureFunctionsNumber.generated.js +375 -375
  15. package/lib/cjs/entry/typeChecks.js +12 -12
  16. package/lib/cjs/expression/operators.js +1 -1
  17. package/lib/cjs/factoriesAny.js +660 -660
  18. package/lib/cjs/factoriesNumber.js +268 -237
  19. package/lib/cjs/header.js +1 -1
  20. package/lib/cjs/plain/bignumber/arithmetic.js +2 -2
  21. package/lib/cjs/plain/number/arithmetic.js +10 -10
  22. package/lib/cjs/plain/number/constants.js +1 -1
  23. package/lib/cjs/plain/number/logical.js +1 -1
  24. package/lib/cjs/plain/number/probability.js +2 -1
  25. package/lib/cjs/plain/number/trigonometry.js +1 -1
  26. package/lib/cjs/plain/number/utils.js +1 -1
  27. package/lib/cjs/type/unit/physicalConstants.js +1 -1
  28. package/lib/cjs/utils/array.js +14 -14
  29. package/lib/cjs/utils/bignumber/bitwise.js +1 -1
  30. package/lib/cjs/utils/customs.js +5 -5
  31. package/lib/cjs/utils/factory.js +3 -3
  32. package/lib/cjs/utils/function.js +1 -1
  33. package/lib/cjs/utils/is.js +23 -23
  34. package/lib/cjs/utils/latex.js +2 -1
  35. package/lib/cjs/utils/map.js +3 -3
  36. package/lib/cjs/utils/noop.js +1 -1
  37. package/lib/cjs/utils/number.js +10 -6
  38. package/lib/cjs/utils/object.js +8 -8
  39. package/lib/cjs/utils/snapshot.js +1 -1
  40. package/lib/cjs/utils/string.js +2 -2
  41. package/lib/cjs/version.js +1 -1
  42. package/lib/esm/core/function/import.js +2 -1
  43. package/lib/esm/entry/dependenciesAny.generated.js +270 -270
  44. package/lib/esm/entry/dependenciesNumber.generated.js +163 -163
  45. package/lib/esm/entry/impureFunctionsAny.generated.js +301 -301
  46. package/lib/esm/entry/impureFunctionsNumber.generated.js +211 -211
  47. package/lib/esm/entry/pureFunctionsAny.generated.js +816 -816
  48. package/lib/esm/entry/pureFunctionsNumber.generated.js +234 -234
  49. package/lib/esm/version.js +1 -1
  50. package/package.json +16 -16
  51. package/types/index.d.ts +250 -71
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createVersion = exports.createUppercaseE = exports.createUppercasePi = exports.createI = exports.createSQRT2 = exports.createSQRT1_2 = exports.createLOG10E = exports.createLOG2E = exports.createLN10 = exports.createLN2 = exports.createPhi = exports.createE = exports.createTau = exports.createPi = exports.createNaN = exports.createInfinity = exports.createNull = exports.createFalse = exports.createTrue = void 0;
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' : value.fn : name; // we allow importing the same function twice if it points to the same implementation
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');