Front end of the Slack clone application.

to-integer.js 279B

12345678910111213
  1. "use strict";
  2. var sign = require("../math/sign")
  3. , abs = Math.abs, floor = Math.floor;
  4. module.exports = function (value) {
  5. if (isNaN(value)) return 0;
  6. value = Number(value);
  7. if ((value === 0) || !isFinite(value)) return value;
  8. return sign(value) * floor(abs(value));
  9. };