@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
17 lines (15 loc) • 423 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;
}
export { isNumberLike };
//# sourceMappingURL=is-number-like.mjs.map