math-exercises 2.2.94 → 2.2.96

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 (209) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionSquare.js +2 -1
  3. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
  7. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
  9. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
  11. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
  13. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
  15. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +82 -34
  17. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
  19. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +86 -36
  21. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +82 -32
  23. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  24. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
  25. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
  27. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +2 -1
  29. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +2 -1
  31. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +2 -1
  33. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +3 -1
  35. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
  37. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
  39. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
  41. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
  43. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
  45. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +38 -16
  47. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts +3 -3
  48. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +171 -75
  50. package/lib/exercises/math/dataReading/index.d.ts +2 -0
  51. package/lib/exercises/math/dataReading/index.d.ts.map +1 -0
  52. package/lib/exercises/math/dataReading/index.js +17 -0
  53. package/lib/exercises/math/dataReading/tableReading.d.ts +8 -0
  54. package/lib/exercises/math/dataReading/tableReading.d.ts.map +1 -0
  55. package/lib/exercises/math/dataReading/tableReading.js +105 -0
  56. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
  58. package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
  59. package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
  60. package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  61. package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
  62. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  63. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
  64. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  65. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +75 -11
  66. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  67. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
  68. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  69. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
  70. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
  71. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
  72. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  73. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
  74. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  75. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
  76. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  77. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
  78. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
  79. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
  80. package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  81. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
  82. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  83. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -2
  84. package/lib/exercises/math/functions/affines/affineExpressionReading.js +2 -1
  85. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/affines/signFunction.js +2 -1
  87. package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
  89. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
  91. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
  93. package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
  95. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  96. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
  97. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  98. package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
  99. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  100. package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
  101. package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
  103. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  104. package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
  105. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
  106. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
  107. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  108. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
  109. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
  110. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
  111. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  112. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
  113. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
  114. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
  115. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  116. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
  117. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
  118. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
  119. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  120. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
  121. package/lib/exercises/math/index.d.ts +1 -0
  122. package/lib/exercises/math/index.d.ts.map +1 -1
  123. package/lib/exercises/math/index.js +1 -0
  124. package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
  125. package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
  126. package/lib/exercises/math/percent/index.d.ts +1 -0
  127. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  128. package/lib/exercises/math/percent/index.js +1 -1
  129. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
  130. package/lib/exercises/math/percent/percentWritings.js +10 -1
  131. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  132. package/lib/exercises/math/powers/powersMixOperations.js +2 -1
  133. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/diceBasicProbas.js +72 -20
  135. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  136. package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
  137. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  138. package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
  139. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  140. package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
  141. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  142. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +2 -1
  143. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  144. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
  145. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  146. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
  147. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  148. package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
  149. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  150. package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
  151. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  152. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
  153. package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
  154. package/lib/exercises/vea/equationVEA.js +2 -1
  155. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  156. package/lib/exercises/vea/rationalVEA.js +3 -2
  157. package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
  158. package/lib/exercises/vea/sqrtVEA.js +2 -1
  159. package/lib/index.d.ts +9 -3
  160. package/lib/index.d.ts.map +1 -1
  161. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  162. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/operators/addNode.d.ts +2 -1
  164. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  165. package/lib/tree/nodes/operators/addNode.js +22 -4
  166. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/operators/fractionNode.js +1 -1
  168. package/lib/tree/nodes/operators/multiplyNode.d.ts +2 -1
  169. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  170. package/lib/tree/nodes/operators/multiplyNode.js +13 -1
  171. package/lib/tree/nodes/operators/operatorNode.d.ts +5 -0
  172. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  173. package/lib/tree/nodes/operators/operatorNode.js +5 -1
  174. package/lib/tree/nodes/polynomials/monomNode.d.ts +2 -6
  175. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  176. package/lib/tree/nodes/polynomials/monomNode.js +102 -94
  177. package/lib/tree/parsers/affineParser.d.ts +1 -1
  178. package/lib/tree/parsers/affineParser.d.ts.map +1 -1
  179. package/lib/tree/parsers/affineParser.js +18 -22
  180. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
  181. package/lib/tree/parsers/discreteSetParser.js +2 -1
  182. package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
  183. package/lib/tree/parsers/equationSolutionParser.js +2 -1
  184. package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
  185. package/lib/tree/parsers/inequationParser.js +2 -1
  186. package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
  187. package/lib/tree/parsers/intervalParser.js +3 -2
  188. package/lib/tree/parsers/latexParser.js +3 -3
  189. package/lib/tree/parsers/monomParser.d.ts.map +1 -1
  190. package/lib/tree/parsers/monomParser.js +2 -1
  191. package/lib/tree/parsers/polynomialParser.d.ts +5 -1
  192. package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
  193. package/lib/tree/parsers/polynomialParser.js +5 -4
  194. package/lib/tree/parsers/powerParser.d.ts.map +1 -1
  195. package/lib/tree/parsers/powerParser.js +2 -1
  196. package/lib/tree/parsers/purifyLatex.d.ts +1 -1
  197. package/lib/tree/parsers/purifyLatex.js +1 -1
  198. package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
  199. package/lib/tree/parsers/sqrtParser.js +2 -1
  200. package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
  201. package/lib/tree/parsers/trinomParser.js +2 -1
  202. package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
  203. package/lib/tree/parsers/unionIntervalParser.js +2 -1
  204. package/lib/utils/alea/random.js +1 -1
  205. package/lib/utils/alea/shuffle.js +1 -1
  206. package/lib/utils/errors/handleVEAError.d.ts +2 -0
  207. package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
  208. package/lib/utils/errors/handleVEAError.js +9 -0
  209. package/package.json +1 -1
@@ -5,7 +5,7 @@ exports.purifyLatex = void 0;
5
5
  * supprime les éléments superflus sans aucun calcul maths
6
6
  * ex : transforme (2) en 2
7
7
  * ex : transforme (9)/3 en 9/3 mais pas en 3
8
- * doit-il transformer 1*x en x ?
8
+ * doit-il transformer 1*x en x ? -> je dirais que non
9
9
  * @param str réponse élève
10
10
  */
11
11
  const purifyLatex = (str) => {
@@ -1 +1 @@
1
- {"version":3,"file":"sqrtParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/sqrtParser.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,uUAuCrC,CAAC"}
1
+ {"version":3,"file":"sqrtParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/sqrtParser.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,uUAuCrC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sqrtParser = void 0;
4
+ const handleVEAError_1 = require("../../utils/errors/handleVEAError");
4
5
  const oppositeNode_1 = require("../nodes/functions/oppositeNode");
5
6
  const sqrtNode_1 = require("../nodes/functions/sqrtNode");
6
7
  const numberNode_1 = require("../nodes/numbers/numberNode");
@@ -46,7 +47,7 @@ const sqrtParser = (ans) => {
46
47
  return false;
47
48
  }
48
49
  catch (err) {
49
- return false;
50
+ return (0, handleVEAError_1.handleVEAError)(err);
50
51
  }
51
52
  };
52
53
  exports.sqrtParser = sqrtParser;
@@ -1 +1 @@
1
- {"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,QAAS,MAAM,aAAY,MAAM,uEAgCzD,CAAC"}
1
+ {"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,QAAS,MAAM,aAAY,MAAM,uEAgCzD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trinomParser = void 0;
4
+ const handleVEAError_1 = require("../../utils/errors/handleVEAError");
4
5
  const addNode_1 = require("../nodes/operators/addNode");
5
6
  const substractNode_1 = require("../nodes/operators/substractNode");
6
7
  const monomNode_1 = require("../nodes/polynomials/monomNode");
@@ -37,7 +38,7 @@ const trinomParser = (ans, variable = "x") => {
37
38
  // return false;
38
39
  }
39
40
  catch (err) {
40
- return false;
41
+ return (0, handleVEAError_1.handleVEAError)(err);
41
42
  }
42
43
  };
43
44
  exports.trinomParser = trinomParser;
@@ -1 +1 @@
1
- {"version":3,"file":"unionIntervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/unionIntervalParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE,KAAK,IAAI,GAAG;IACV,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,mBAAmB,QAAS,MAAM,SAAS,IAAI,6CAmB3D,CAAC"}
1
+ {"version":3,"file":"unionIntervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/unionIntervalParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE,KAAK,IAAI,GAAG;IACV,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,mBAAmB,QAAS,MAAM,SAAS,IAAI,6CAmB3D,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unionIntervalParser = void 0;
4
+ const handleVEAError_1 = require("../../utils/errors/handleVEAError");
4
5
  const unionIntervalNode_1 = require("../nodes/sets/unionIntervalNode");
5
6
  const intervalParser_1 = require("./intervalParser");
6
7
  const unionIntervalParser = (ans, opts) => {
@@ -22,7 +23,7 @@ const unionIntervalParser = (ans, opts) => {
22
23
  }));
23
24
  }
24
25
  catch (err) {
25
- return false;
26
+ return (0, handleVEAError_1.handleVEAError)(err);
26
27
  }
27
28
  };
28
29
  exports.unionIntervalParser = unionIntervalParser;
@@ -14,7 +14,7 @@ function randomMany(array, count, excludes) {
14
14
  let i = 0;
15
15
  while (res.length < count) {
16
16
  if (i > 10000)
17
- throw new Error("randomMany malformed");
17
+ throw new Error("should-throw randomMany malformed");
18
18
  i++;
19
19
  res.push(random(array, [...res, ...(excludes ?? [])]));
20
20
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shuffle = void 0;
4
- /* Randomize array in-place using Durstenfeld shuffle algorithm */
4
+ /* Randomize array using Durstenfeld shuffle algorithm */
5
5
  function shuffle(array) {
6
6
  const res = [...array];
7
7
  for (var i = res.length - 1; i > 0; i--) {
@@ -0,0 +1,2 @@
1
+ export declare const handleVEAError: (err: any) => false;
2
+ //# sourceMappingURL=handleVEAError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleVEAError.d.ts","sourceRoot":"","sources":["../../../src/utils/errors/handleVEAError.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAS,GAAG,KAAG,KAGzC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleVEAError = void 0;
4
+ const handleVEAError = (err) => {
5
+ if (err.message.includes("should-throw"))
6
+ throw err;
7
+ return false;
8
+ };
9
+ exports.handleVEAError = handleVEAError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.2.94",
3
+ "version": "2.2.96",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [