Front end of the Slack clone application.

1234567891011121314
  1. "use strict";
  2. var floor = Math.floor;
  3. module.exports = function (value) {
  4. if (isNaN(value)) return NaN;
  5. value = Number(value);
  6. if (value === 0) return value;
  7. if (value === Infinity) return Infinity;
  8. if (value === -Infinity) return -Infinity;
  9. if (value > 0) return floor(value);
  10. return -floor(-value);
  11. };