revenge-bundle-next/lib/utils/src/proxy.ts

14 lines
302 B
TypeScript
Raw Normal View History

2025-03-30 23:28:03 +07:00
import { _instances, _targets } from '../../init/src/patches/proxy'
2025-03-21 19:59:16 +07:00
/**
* Returns whether the object is a proxy
* @param obj The object to check
*/
export function isProxy(obj: object) {
return _instances.has(obj)
}
2025-03-30 23:28:03 +07:00
export function getProxyTarget(obj: object) {
return _targets.get(obj)
}