Proxy is a new API in ES6, which is used to redefine some basic operation of Object.
usage
Proxy(target, handlers), target is the target object while handlers is an object whose properties are functions that define the user's behaviors when performing operations. Those operations are also called traps.
definition
Proxy
is a new API in ES6, which is used to redefine some basic operation ofObject
.usage
Proxy(target, handlers)
,target
is the target object whilehandlers
is an object whose properties are functions that define the user's behaviors when performing operations. Those operations are also calledtraps
.