katoikia-app/web-ui/web-react/node_modules/es5-ext/object/ensure-finite-number.js

10 lines
296 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
"use strict";
var isFiniteNumber = require("./is-finite-number")
, safeToString = require("../safe-to-string");
module.exports = function (value) {
if (isFiniteNumber(value)) return Number(value);
throw new TypeError(safeToString(value) + " does not represent a finite number value");
};