Front end of the Slack clone application.

123456789101112
  1. "use strict";
  2. var exp = Math.exp;
  3. module.exports = function (value) {
  4. if (isNaN(value)) return NaN;
  5. value = Number(value);
  6. if (value === 0) return 1;
  7. if (!isFinite(value)) return Infinity;
  8. return (exp(value) + exp(-value)) / 2;
  9. };