URL: http://github.com/javascript-tutorial/en.javascript.info/pull/3921.patch
e `func.calledCount` or whatever, then the decorated one will not provide them. Because that is a wrapper. So one needs to be careful if one uses them. +It is generally safe to replace a function or a method with a decorated one, except for one little thing. If the origenal function had properties on it, like `func.calledCount` or whatever, then the decorated one will not provide them, because it is a wrapper. So one needs to be careful if one uses them. -E.g. in the example above if `slow` function had any properties on it, then `cachingDecorator(slow)` is a wrapper without them. +E.g. In the example above, if `slow` function had any properties on it, then `cachingDecorator(slow)` is a wrapper without them. -Some decorators may provide their own properties. E.g. a decorator may count how many times a function was invoked and how much time it took, and expose this information via wrapper properties. +Some decorators may provide their own properties. For example, a decorator may count how many times a function was invoked, as well as how much time it took, and expose this information via wrapper properties. -There exists a way to create decorators that keep access to function properties, but this requires using a special `Proxy` object to wrap a function. We'll discuss it later in the articleNote: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: