si-funciona 2.3.0 → 2.3.1

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/README.md CHANGED
@@ -608,7 +608,7 @@ Helper for calculating the multiplier that would make each number relative to ea
608
608
  <a name="module_numberHelpers.greatestCommonDivisor"></a>
609
609
 
610
610
  ### numberHelpers.greatestCommonDivisor(num1, num2) ⇒ <code>number</code>
611
- Return the highest number than can be divided into both numbers.
611
+ Return the highest number that can be divided into both numbers.
612
612
 
613
613
  **Kind**: static method of [<code>numberHelpers</code>](#module_numberHelpers)
614
614
 
@@ -1477,7 +1477,7 @@
1477
1477
  exports.default = void 0
1478
1478
  require('core-js/stable')
1479
1479
  /**
1480
- * Return the highest number than can be divided into both numbers.
1480
+ * Return the highest number that can be divided into both numbers.
1481
1481
  * @memberOf module:numberHelpers
1482
1482
  * @param {number} num1 - First number to assess
1483
1483
  * @param {number} num2 - Second number to compare for common divisor
@@ -1604,7 +1604,9 @@
1604
1604
  if (numbers.length === 0) {
1605
1605
  return []
1606
1606
  }
1607
- const commonDivisor = numbers.reduce((num1, num2) => (0, _greatestCommonDivisor.default)(num1, num2), 0)
1607
+ let commonDivisor = numbers.reduce((num1, num2) => (0, _greatestCommonDivisor.default)(num1, num2), 0)
1608
+ // Set to positive so that when we divide the numbers they retain their +/-
1609
+ commonDivisor = Math.abs(commonDivisor)
1608
1610
  return numbers.map(num => num / commonDivisor)
1609
1611
  }
1610
1612
  var _default = exports.default = simplestRatio