MMMRjs a product of BYTES Genesis We have published a product today called MMMR.js this product is licensed under the MIT license and is built by Syed Mohammad Sannan.
The uniqueness of this product is that it is built with and for Javascript though there are many libraries out there such as NumPY, SciPY, and much much more but they are built for Python or another language and there isn't one for JavaScript that is where MMMR.js comes.
here.
This is the source code of MMMR.js:
// Mean - The average value.
// Median - The mid point value.
// Mode - The most common value.
// Range The smallest and the biggest value.

// This is Mean.
// Mean returns the average value from an array of numbers.
// To call/run this function we can type mean(Your array of numbers separated with commas ',');
const mean = (numbers) =&gt; {
  let total = 0,
    i;
  for (i = 0; i &lt; numbers.length; i += 1) {
    total += numbers[i];
  }
  return total / numbers.length;
};



// This is Median.
// Median returns the middle point value from an array of numbers.
// To call/run this function we can type median(Your array of numbers separated with commas ',');
const median = (numbers) =&gt; {
  const sorted = numbers.slice().sort((a, b) =&gt; a - b);
  const middle = Math.floor(sorted.length / 2);

  if (sorted.length % 2 === 0) {
    return (sorted[middle - 1] + sorted[middle]) / 2;
  }

  return sorted[middle];
};



// This is Mode.
// Mode returns the most common/used value from an array of string, numbers, etc.
// To call/run this function we can type mode(your array of numbers);
const mode = (a) =&gt; {
  a.sort((x, y) =&gt; x - y);

  let bestStreak = 1;
  let bestElem = a[0];
  let currentStreak = 1;
  let currentElem = a[0];

  for (let i = 1; i &lt; a.length; i++) {
    if (a[i - 1] !== a[i]) {
      if (currentStreak &gt; bestStreak) {
        bestStreak = currentStreak;
        bestElem = currentElem;
      }

      currentStreak = 0;
      currentElem = a[i];
    }

    currentStreak++;
  }

  return currentStreak &gt; bestStreak ? currentElem : bestElem;
};



// This is Range.
// Range is basically a function used to return the smallest and the biggest values from an array of numbers.
// To call/run this function we can type range(your array of numbers);
const range = (value) =&gt; {
  value.sort();
  return [value[0], value[value.length - 1]];
}

We just wanted you to review this code and tell us is this library user-friendly, maintainable and what improvements can we add to this.
Comments

The comments such a This is Mean. are pointless.

And the comment 

// To call/run this function we can type mean(Your array of numbers separated with commas ',');


is a bit strange. Are they targeting people who don't know basic JavaScript syntax? Then why mention commas, but not the brackets ([...]) needed for an array.

It probably would be a good idea to instead use a standard comment format for documentation such as jsdoc.

Sorting

The comparison function used for sorting ((a, b) =&gt; a - b) is pointless, because that is the default.

Mutating the input array

In median you are creating a copy of the input array with .slice() before sorting it, so that it isn't modified, which is a good thing. You should do the same in mode and range.

Validating the input

You should consider validating the input. mean, mode and range break or give unexpected results if you give them an empty array. It's probably best to check if they are receiving an array at all.