题解 | #Proxy拦截器#
Proxy拦截器
https://www.nowcoder.com/practice/bd313bf21dc342a981f6ed87e21308b7
const _proxy = (object, ...prototypes) => {
return new Proxy(object, {
get(target, prop, receiver) {
return prototypes.includes(prop) ? 'noright' : Reflect.get(...arguments)
}
})
};
腾讯公司福利 1143人发布