wallet-core/node_modules/es5-ext/object/ensure-finite-number.js
2017-08-14 05:02:09 +02:00

10 lines
289 B
JavaScript

"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 + " does not represent a finite number value");
};