var f = [
  "Array",
  "ArrayBuffer",
  "AsyncFunction",
  "AsyncGenerator",
  "AsyncGeneratorFunction",
  "Date",
  "Error",
  "Function",
  "Generator",
  "GeneratorFunction",
  "HTMLElement",
  "Map",
  "Object",
  "Promise",
  "RegExp",
  "Set",
  "WeakMap",
  "WeakSet"
], s = [
  "bigint",
  "boolean",
  "null",
  "number",
  "string",
  "symbol",
  "undefined"
];
function u(n) {
  const r = Object.prototype.toString.call(n).slice(8, -1);
  if (/HTML\w+Element/.test(r))
    return "HTMLElement";
  if (a(r))
    return r;
}
function t(n) {
  return (r) => u(r) === n;
}
function a(n) {
  return f.includes(n);
}
function i(n) {
  return (r) => typeof r === n;
}
function y(n) {
  return s.includes(n);
}
var b = [
  "innerHTML",
  "ownerDocument",
  "style",
  "attributes",
  "nodeValue"
];
function e(n) {
  if (n === null)
    return "null";
  switch (typeof n) {
    case "bigint":
      return "bigint";
    case "boolean":
      return "boolean";
    case "number":
      return "number";
    case "string":
      return "string";
    case "symbol":
      return "symbol";
    case "undefined":
      return "undefined";
  }
  if (e.array(n))
    return "Array";
  if (e.plainFunction(n))
    return "Function";
  const r = u(n);
  return r || "Object";
}
e.array = Array.isArray;
e.arrayOf = (n, r) => !e.array(n) && !e.function(r) ? !1 : n.every((o) => r(o));
e.asyncGeneratorFunction = (n) => u(n) === "AsyncGeneratorFunction";
e.asyncFunction = t("AsyncFunction");
e.bigint = i("bigint");
e.boolean = (n) => n === !0 || n === !1;
e.date = t("Date");
e.defined = (n) => !e.undefined(n);
e.domElement = (n) => e.object(n) && !e.plainObject(n) && n.nodeType === 1 && e.string(n.nodeName) && b.every((r) => r in n);
e.empty = (n) => e.string(n) && n.length === 0 || e.array(n) && n.length === 0 || e.object(n) && !e.map(n) && !e.set(n) && Object.keys(n).length === 0 || e.set(n) && n.size === 0 || e.map(n) && n.size === 0;
e.error = t("Error");
e.function = i("function");
e.generator = (n) => e.iterable(n) && e.function(n.next) && e.function(n.throw);
e.generatorFunction = t("GeneratorFunction");
e.instanceOf = (n, r) => !n || !r ? !1 : Object.getPrototypeOf(n) === r.prototype;
e.iterable = (n) => !e.nullOrUndefined(n) && e.function(n[Symbol.iterator]);
e.map = t("Map");
e.nan = (n) => Number.isNaN(n);
e.null = (n) => n === null;
e.nullOrUndefined = (n) => e.null(n) || e.undefined(n);
e.number = (n) => i("number")(n) && !e.nan(n);
e.numericString = (n) => e.string(n) && n.length > 0 && !Number.isNaN(Number(n));
e.object = (n) => !e.nullOrUndefined(n) && (e.function(n) || typeof n == "object");
e.oneOf = (n, r) => e.array(n) ? n.indexOf(r) > -1 : !1;
e.plainFunction = t("Function");
e.plainObject = (n) => {
  if (u(n) !== "Object")
    return !1;
  const r = Object.getPrototypeOf(n);
  return r === null || r === Object.getPrototypeOf({});
};
e.primitive = (n) => e.null(n) || y(typeof n);
e.promise = t("Promise");
e.propertyOf = (n, r, o) => {
  if (!e.object(n) || !r)
    return !1;
  const c = n[r];
  return e.function(o) ? o(c) : e.defined(c);
};
e.regexp = t("RegExp");
e.set = t("Set");
e.string = i("string");
e.symbol = i("symbol");
e.undefined = i("undefined");
e.weakMap = t("WeakMap");
e.weakSet = t("WeakSet");
var p = e;
export {
  p as default
};
//# sourceMappingURL=index.js.map
