ideaz-element
Version:
<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>
92 lines (91 loc) • 1.94 kB
JavaScript
const { toString: c } = Object.prototype;
function t(n, i) {
return c.call(n) === `[object ${i}]`;
}
function f(n) {
return typeof n < "u";
}
function u(n) {
return !f(n);
}
function e(n) {
return n !== null && t(n, "Object");
}
function w(n) {
return d(n) || s(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : e(n) ? Object.keys(n).length === 0 : !1;
}
function l(n) {
return t(n, "Date");
}
function o(n) {
return n === null;
}
function y(n) {
return u(n) && o(n);
}
function g(n) {
return u(n) || o(n);
}
function b(n) {
return t(n, "Number");
}
function m(n) {
return t(n, "Promise") && e(n) && r(n.then) && r(n.catch);
}
function s(n) {
return t(n, "String");
}
function r(n) {
return typeof n == "function";
}
function O(n) {
return t(n, "Boolean");
}
function S(n) {
return t(n, "RegExp");
}
function d(n) {
return n && Array.isArray(n);
}
function h(n) {
return typeof window < "u" && t(n, "Window");
}
function j(n) {
return e(n) && !!n.tagName;
}
function A(n) {
return t(n, "Map");
}
const D = (n) => n != null, p = typeof window > "u", N = !p;
function E(n) {
return /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(n);
}
const U = (n) => !!(s(n) && (n.includes("slot") || n.includes("Slot"))), $ = (n) => typeof n != "object" || n === null ? !0 : Object.keys(n).length === 0;
export {
t as is,
d as isArray,
O as isBoolean,
N as isClient,
l as isDate,
f as isDef,
j as isElement,
w as isEmpty,
$ as isEmptyObject,
r as isFunction,
A as isMap,
o as isNull,
y as isNullAndUnDef,
g as isNullOrUnDef,
b as isNumber,
e as isObject,
m as isPromise,
S as isRegExp,
p as isServer,
U as isSlot,
s as isString,
u as isUnDef,
E as isUrl,
D as isValid,
h as isWindow
};
//# sourceMappingURL=is.mjs.map