- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
75 lines
2.0 KiB
JavaScript
75 lines
2.0 KiB
JavaScript
'use strict';
|
|
|
|
function isNumber(value) {
|
|
return typeof value === "number";
|
|
}
|
|
function isNotNumber(value) {
|
|
return typeof value !== "number" || Number.isNaN(value) || !Number.isFinite(value);
|
|
}
|
|
function isNumeric(value) {
|
|
return value != null && value - parseFloat(value) + 1 >= 0;
|
|
}
|
|
function isArray(value) {
|
|
return Array.isArray(value);
|
|
}
|
|
function isEmptyArray(value) {
|
|
return isArray(value) && value.length === 0;
|
|
}
|
|
function isFunction(value) {
|
|
return typeof value === "function";
|
|
}
|
|
function isDefined(value) {
|
|
return typeof value !== "undefined" && value !== void 0;
|
|
}
|
|
function isUndefined(value) {
|
|
return typeof value === "undefined" || value === void 0;
|
|
}
|
|
function isObject(value) {
|
|
const type = typeof value;
|
|
return value != null && (type === "object" || type === "function") && !isArray(value);
|
|
}
|
|
function isEmptyObject(value) {
|
|
return isObject(value) && Object.keys(value).length === 0;
|
|
}
|
|
function isNull(value) {
|
|
return value == null;
|
|
}
|
|
function isString(value) {
|
|
return Object.prototype.toString.call(value) === "[object String]";
|
|
}
|
|
function isCssVar(value) {
|
|
return /^var\(--.+\)$/.test(value);
|
|
}
|
|
function isEmpty(value) {
|
|
if (isArray(value))
|
|
return isEmptyArray(value);
|
|
if (isObject(value))
|
|
return isEmptyObject(value);
|
|
if (value == null || value === "")
|
|
return true;
|
|
return false;
|
|
}
|
|
function isRefObject(val) {
|
|
return "current" in val;
|
|
}
|
|
function isInputEvent(value) {
|
|
return value && isObject(value) && isObject(value.target);
|
|
}
|
|
|
|
exports.isArray = isArray;
|
|
exports.isCssVar = isCssVar;
|
|
exports.isDefined = isDefined;
|
|
exports.isEmpty = isEmpty;
|
|
exports.isEmptyArray = isEmptyArray;
|
|
exports.isEmptyObject = isEmptyObject;
|
|
exports.isFunction = isFunction;
|
|
exports.isInputEvent = isInputEvent;
|
|
exports.isNotNumber = isNotNumber;
|
|
exports.isNull = isNull;
|
|
exports.isNumber = isNumber;
|
|
exports.isNumeric = isNumeric;
|
|
exports.isObject = isObject;
|
|
exports.isRefObject = isRefObject;
|
|
exports.isString = isString;
|
|
exports.isUndefined = isUndefined;
|