Front end of the Slack clone application.

ensure-finite-number.js 296B

12345678910
  1. "use strict";
  2. var isFiniteNumber = require("./is-finite-number")
  3. , safeToString = require("../safe-to-string");
  4. module.exports = function (value) {
  5. if (isFiniteNumber(value)) return Number(value);
  6. throw new TypeError(safeToString(value) + " does not represent a finite number value");
  7. };