UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

29 lines (28 loc) 833 B
import { REF as t } from "./constants.js"; import { MissingReflexActionError as e } from "./errors.js"; import { isFunction as i, isUndefined as c } from "../../../utils/value/is.js"; import { hasOwnProperty as o } from "../../../utils/struct/property.js"; import { sameValue as f } from "../../../utils/value/compare.js"; import { EMPTY_OBJECT as m } from "../../../utils/value/constants.js"; function O(r) { if (!i(r)) throw new e(); } const p = (r) => { try { if (i(r) && o(r, "current") && o(r, t) && !f(r, r[t])) { const s = r.actions.get(m), n = r.actions.size; return c(s) && Number.isInteger(n) && n >= 0; } } catch { } return !1; }, u = (r) => p(r) ? u(r[t]) : r; function x(r) { return !!r.current; } export { O as assertReflexAction, x as isRefObject, p as isReflex, u as unwrap };