{"size": 1599, "ext": "js", "max_stars_repo_path": "dist/numbers/isLessThan.js", "max_stars_repo_name": "somesocks/vet", "max_stars_repo_stars_event_min_datetime": "2017-04-16T07:03:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-05T10:37:46.000Z", "max_issues_repo_path": "dist/numbers/isLessThan.js", "max_issues_repo_name": "somesocks/vet", "max_issues_repo_issues_event_min_datetime": "2019-06-16T18:29:44.000Z", "max_issues_repo_issues_event_max_datetime": "2020-03-05T10:56:28.000Z", "max_forks_repo_path": "dist/numbers/isLessThan.js", "max_forks_repo_name": "somesocks/vet", "max_forks_repo_forks_event_min_datetime": "2017-07-30T18:49:27.000Z", "max_forks_repo_forks_event_max_datetime": "2017-07-30T18:49:27.000Z"}
{"max_stars_count": 44, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 31.98, "max_line_length": 72, "alphanum_fraction": 0.6672920575}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var assert_1 = __importDefault(require("../utils/assert"));
var isNumber_1 = __importDefault(require("./isNumber"));
/**
* construct a validator to check if a value is less than a number
* @param {number} bound - the boundary value to check agains
* @returns {function} - a validator function
* @memberof vet.numbers
*/
function isLessThan(bound) {
    var res = function (val) {
        return isNumber_1.default(val) && val < bound;
    };
    res.assert = assert_1.default(res);
    res.schema = 'isNumberLessThan(' + bound + ')';
    return res;
}
/**
* @name exclusive
* @param {number} bound - the boundary value to check against
* @returns {function} - a validator function
* @memberof vet.numbers.isLessThan
*/
isLessThan.exclusive = function exclusive(bound) {
    var res = function (val) {
        return isNumber_1.default(val) && val < bound;
    };
    res.assert = assert_1.default(res);
    res.schema = 'isNumberLessThan.exclusive(' + bound + ')';
    return res;
};
/**
* @name inclusive
* @param {number} bound - the boundary value to check against
* @returns {function} - a validator function
* @memberof vet.numbers.isLessThan
*/
isLessThan.inclusive = function inclusive(bound) {
    var res = function (val) {
        return isNumber_1.default(val) && val <= bound;
    };
    res.assert = assert_1.default(res);
    res.schema = 'isNumberLessThan.inclusive(' + bound + ')';
    return res;
};
module.exports = isLessThan;
