Package Exports
- @actualwave/with-proxy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@actualwave/with-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
withProxy
Factory generator for wrapping objects with Proxy. Applies construct and apply traps to function targets.
const myFactory = withProxy({
get: myGetHandler,
set: mySetHandler,
apply: myApplyHandler,
construct: myConstructHandler,
});
const myWrappedFunction = myFactory(() => null); // gets all traps
const myWrappedObject = myFactory({}); // does not get "apply" and "construct" traps