@gracious.tech/bible-references
Version:
Bible reference detection, parsing, and rendering that supports any language.
18 lines (17 loc) • 309 B
JavaScript
function parse_int(input, min, max) {
let int = parseInt(input, 10);
if (Number.isNaN(int)) {
return null;
}
if (min !== void 0) {
int = Math.max(int, min);
}
if (max !== void 0) {
int = Math.min(int, max);
}
return int;
}
export {
parse_int
};
//# sourceMappingURL=utils.js.map