safers
Version:
Safely convert to the desired data and error-free refine values.
24 lines (23 loc) • 602 B
JavaScript
import { deepCompare as o } from "../utils/deepCompare.js";
import { isArray as m } from "../utils/isArray.js";
import { isObject as p } from "../utils/isObject.js";
import { isNullish as f } from "../utils/isNullish.js";
import "../../lib/identifyType-d39b7385.js";
import "../utils/isNull.js";
import "../utils/isUndefined.js";
function h(t, i) {
if (f(i))
return !1;
let e = /* @__PURE__ */ new Set();
m(t) ? t.map((r) => {
e.add(r);
}) : e.add(t);
try {
return [...e].some((r) => p(r) || m(r) ? o(r, i) : r === i);
} catch {
return !1;
}
}
export {
h as includes
};