Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function safeProxy(target, handler) {
if (!glob.Proxy) {
const ProxyPolyfill = proxyPolyfill();
return new ProxyPolyfill(target, handler);
}
return new Proxy(target, handler);
}