@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
19 lines (16 loc) • 450 B
JavaScript
'use client';
;
function isNumberLike(value) {
if (typeof value === "number") {
return true;
}
if (typeof value === "string") {
if (value.startsWith("calc(") || value.startsWith("var(") || value.includes(" ") && value.trim() !== "") {
return true;
}
return /[0-9]/.test(value.trim().replace("-", "")[0]);
}
return false;
}
exports.isNumberLike = isNumberLike;
//# sourceMappingURL=is-number-like.cjs.map