Vanilla JavaScript test for Proxy object vs. normal JS object
I wrapped my head around this problem and came up with this pretty neat solution: const isProxy = (proxy: any) => { if (typeof proxy !== 'object') return false const obj = new Object() return obj !== proxy.valueOf(obj) }
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.