Sha256: b9007eff673f64cfb8670ebfd45a2e5838f92a7f518e53364ea49e8bcf5570fa
Contents?: true
Size: 300 Bytes
Versions: 47
Compression:
Stored size: 300 Bytes
Contents
"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; };
Version data entries
47 entries across 47 versions & 3 rubygems