mathjs 12.4.1 → 12.4.3

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.
Files changed (67) hide show
  1. package/HISTORY.md +17 -0
  2. package/README.md +4 -0
  3. package/bin/cli.js +1 -1
  4. package/lib/browser/math.js +1 -1
  5. package/lib/browser/math.js.LICENSE.txt +2 -2
  6. package/lib/browser/math.js.map +1 -1
  7. package/lib/cjs/core/create.js +3 -3
  8. package/lib/cjs/core/function/config.js +1 -11
  9. package/lib/cjs/core/function/import.js +3 -4
  10. package/lib/cjs/defaultInstance.js +1 -1
  11. package/lib/cjs/entry/allFactoriesAny.js +1 -1
  12. package/lib/cjs/entry/allFactoriesNumber.js +1 -1
  13. package/lib/cjs/expression/node/AccessorNode.js +2 -3
  14. package/lib/cjs/expression/node/ArrayNode.js +2 -3
  15. package/lib/cjs/expression/node/AssignmentNode.js +2 -3
  16. package/lib/cjs/expression/node/BlockNode.js +2 -3
  17. package/lib/cjs/expression/node/ConditionalNode.js +2 -3
  18. package/lib/cjs/expression/node/ConstantNode.js +2 -3
  19. package/lib/cjs/expression/node/FunctionAssignmentNode.js +2 -3
  20. package/lib/cjs/expression/node/FunctionNode.js +5 -6
  21. package/lib/cjs/expression/node/IndexNode.js +2 -3
  22. package/lib/cjs/expression/node/Node.js +1 -2
  23. package/lib/cjs/expression/node/ObjectNode.js +2 -3
  24. package/lib/cjs/expression/node/OperatorNode.js +2 -3
  25. package/lib/cjs/expression/node/ParenthesisNode.js +2 -3
  26. package/lib/cjs/expression/node/RangeNode.js +2 -3
  27. package/lib/cjs/expression/node/RelationalNode.js +2 -3
  28. package/lib/cjs/expression/node/SymbolNode.js +2 -3
  29. package/lib/cjs/expression/parse.js +7 -7
  30. package/lib/cjs/function/algebra/derivative.js +1 -1
  31. package/lib/cjs/function/algebra/rationalize.js +2 -2
  32. package/lib/cjs/function/algebra/simplifyConstant.js +1 -1
  33. package/lib/cjs/function/statistics/mad.js +1 -1
  34. package/lib/cjs/function/statistics/std.js +1 -1
  35. package/lib/cjs/function/statistics/utils/improveErrorMessage.js +2 -2
  36. package/lib/cjs/function/utils/isNaN.js +5 -3
  37. package/lib/cjs/header.js +2 -2
  38. package/lib/cjs/type/unit/Unit.js +3 -2
  39. package/lib/cjs/utils/array.js +0 -11
  40. package/lib/cjs/utils/bignumber/formatter.js +1 -1
  41. package/lib/cjs/utils/factory.js +1 -2
  42. package/lib/cjs/utils/map.js +2 -4
  43. package/lib/cjs/utils/object.js +1 -7
  44. package/lib/cjs/utils/snapshot.js +5 -5
  45. package/lib/cjs/version.js +1 -1
  46. package/lib/esm/core/create.js +3 -3
  47. package/lib/esm/core/function/config.js +1 -11
  48. package/lib/esm/core/function/import.js +3 -4
  49. package/lib/esm/expression/node/FunctionNode.js +3 -3
  50. package/lib/esm/expression/parse.js +7 -7
  51. package/lib/esm/function/algebra/derivative.js +1 -1
  52. package/lib/esm/function/algebra/rationalize.js +2 -2
  53. package/lib/esm/function/algebra/simplifyConstant.js +1 -1
  54. package/lib/esm/function/statistics/mad.js +1 -1
  55. package/lib/esm/function/statistics/std.js +1 -1
  56. package/lib/esm/function/statistics/utils/improveErrorMessage.js +2 -2
  57. package/lib/esm/function/utils/isNaN.js +1 -3
  58. package/lib/esm/type/unit/Unit.js +3 -2
  59. package/lib/esm/utils/array.js +0 -10
  60. package/lib/esm/utils/bignumber/formatter.js +1 -1
  61. package/lib/esm/utils/factory.js +1 -2
  62. package/lib/esm/utils/object.js +1 -4
  63. package/lib/esm/utils/snapshot.js +4 -4
  64. package/lib/esm/version.js +1 -1
  65. package/package.json +15 -15
  66. package/types/EXPLANATION.md +13 -1
  67. package/types/index.d.ts +18 -1
package/HISTORY.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # History
2
2
 
3
+ # 2024-05-31, 12.4.3
4
+
5
+ - Fix: serialization of Units without a value, see #1240.
6
+ - Fix: outdated, incorrect documentation about the order of precedence for
7
+ operator modulus `%`. See #3189.
8
+ - Fix: #3197 improve `quantileSeq` type definitions (#3198). Thanks @domdomegg.
9
+
10
+
11
+ # 2024-04-24, 12.4.2
12
+
13
+ - Fix #3192: function `isNaN` returns `false` for `NaN` units in a matrix or
14
+ array (#3193). Thanks @lgerin.
15
+ - Fix: #3180 fix type definitions of functions `add` and `multiply` to allow
16
+ more than two arguments.
17
+ - Docs: correct the docs about `traverse` returning void (#3177).
18
+ Thanks @rohildshah.
19
+
3
20
 
4
21
  # 2024-03-13, 12.4.1
5
22
 
package/README.md CHANGED
@@ -160,6 +160,10 @@ Then, the tests can be executed:
160
160
 
161
161
  npm test
162
162
 
163
+ To test the type definitions:
164
+
165
+ npm run test:types
166
+
163
167
  Additionally, the tests can be run on FireFox using [headless mode](https://developer.mozilla.org/en-US/Firefox/Headless_mode):
164
168
 
165
169
  npm run test:browser
package/bin/cli.js CHANGED
@@ -113,7 +113,7 @@ function completer (text) {
113
113
  const ignore = ['expr', 'type']
114
114
  for (const func in math.expression.mathWithTransform) {
115
115
  if (hasOwnProperty(math.expression.mathWithTransform, func)) {
116
- if (func.indexOf(keyword) === 0 && ignore.indexOf(func) === -1) {
116
+ if (func.indexOf(keyword) === 0 && !ignore.includes(func)) {
117
117
  matches.push(func)
118
118
  }
119
119
  }