frontend/.pnpm-store/v3/files/2d/ccdf1b89d13ddb16f1d73727ab0c92324e15a78aa1d62b1a50159e8dc05f8a08f553df83c761159d7c04747c63c8680bf607dfd5b6ecca733f8410c926aced

11 lines
312 B
Plaintext

"use strict";
var isNaturalValue = require("./is-natural-number-value")
, toShortString = require("../to-short-string-representation");
module.exports = function (arg) {
var num = Number(arg);
if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number");
return num;
};