frontend/.pnpm-store/v3/files/24/898ec5422094fbc49c60d16884310916513c5883bbdd2fb40a124e8f0e12e7ecdb42744e47b442da179a470006114b07d2dd19451689cf306f61aa4bda514a

11 lines
300 B
Plaintext

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