"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_1 = require("lodash");
exports.isNotEmpty = (value) => value !== '' && value !== null && typeof value !== 'undefined';
exports.isString = (value) => typeof value === 'string';
exports.isInt = (value) => Number.isInteger(value);
exports.isNumber = (value) => lodash_1.isNumber(value);
exports.numericality = ({ gt, gte, lt, lte }) => (value) => {
    if (gt !== undefined && value <= gt) {
        return false;
    }
    if (gte !== undefined && value < gte) {
        return false;
    }
    if (lt !== undefined && value >= lt) {
        return false;
    }
    if (lte !== undefined && value > lte) {
        return false;
    }
    return true;
};
exports.isDate = (value) => new Date(value).toString() !== 'Invalid Date';
//# sourceMappingURL=validators.js.map