@khanacademy/kas 0.3.9 → 0.3.11

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.
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
11
11
 
12
12
  // This file is processed by a Rollup plugin (replace) to inject the production
13
13
  const libName = "@khanacademy/kas";
14
- const libVersion = "0.3.9";
14
+ const libVersion = "0.3.11";
15
15
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
16
16
 
17
17
  // this is a @generated file
@@ -5825,15 +5825,12 @@ var derivedUnits = {
5825
5825
  const Zero = Num.Zero;
5826
5826
  const One = Num.One;
5827
5827
 
5828
- /* eslint-disable */
5829
-
5830
5828
  // Assumes that both expressions have already been parsed
5831
5829
  // TODO(alex): be able to pass a random() function to compare()
5832
5830
  const compare = function (expr1, expr2, options) {
5833
- var defaults = {
5831
+ const defaults = {
5834
5832
  form: false,
5835
- // Check that the two expressions have the same form
5836
- simplify: false // Check that the second expression is simplified
5833
+ simplify: false
5837
5834
  };
5838
5835
 
5839
5836
  /* Options that could be added in the future:
@@ -5841,20 +5838,17 @@ const compare = function (expr1, expr2, options) {
5841
5838
  * like slope
5842
5839
  * - Allow student to choose their own variable names
5843
5840
  */
5844
-
5845
- if (options !== undefined) {
5846
- // eslint-disable-next-line no-undef
5847
- options = ___default["default"].extend(defaults, options);
5848
- } else {
5849
- options = defaults;
5850
- }
5841
+ options = {
5842
+ ...defaults,
5843
+ ...options
5844
+ };
5851
5845
 
5852
5846
  // TODO(CP-1614): Figure out how to make these messages translatable
5853
5847
 
5854
5848
  // Variable check
5855
- var vars = expr1.sameVars(expr2);
5849
+ const vars = expr1.sameVars(expr2);
5856
5850
  if (!vars.equal) {
5857
- var message;
5851
+ let message;
5858
5852
  if (vars.equalIgnoringCase) {
5859
5853
  message = "Check your variables; one or more are using " + "the wrong case (upper or lower).";
5860
5854
  } else {