@sebgroup/frontend-tools
Version:
A set of frontend tools
14 lines (12 loc) • 493 B
JavaScript
/**
* 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;
}
export { checkStringLength };
//# sourceMappingURL=checkStringLength.js.map