@sebgroup/frontend-tools
Version:
A set of frontend tools
18 lines (14 loc) • 589 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
/**
* Check if a string matches a specific length
* @param {string} value The string to be checked
* @param {number} min The desired minimum length
* @param {number} max The desired maximum length
* @returns {boolean} True if the string length falls between the minimum and the maximum
*/
function checkStringLength(value, min, max) {
return value && value.length >= min && value.length <= max;
}
exports.checkStringLength = checkStringLength;
//# sourceMappingURL=checkStringLength.js.map