
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A Proxy handler maker that drastically simplifies making and using Harmony Proxies by combining traps and normalizing their arguments.
Base on direct-proxies but simplified and without verification. EasyProxy allows for simplified creation of Proxies.
npm install easy-proxy
Names modified for brevity, argument order normalized, fwd
and target
provided. A handler can be reused much more easily since the target is always provided.
var proxied = EasyProxy(target, {
fix: function(fwd, target){}, // Object.freeze(target)
delete: function(fwd, target, name){}, // delete target[name]
names: function(fwd, target){}, // Object.getOwnPropertyNames(target)
keys: function(fwd, target){}, // Object.keys(target)
enumerate: function(fwd, target){}, // for..in target
owns: function(fwd, target, name){}, // target.hasOwnProperty(name)
has: function(fwd, target, name){}, // name in target
get: function(fwd, target, name, rcvr){}, // target[name]
set: function(fwd, target, name, rcvr, val){}, // target[name] = value
describe: function(fwd, target, name){}, // Object.getOwnPropertyDescriptor(target, name)
define: function(fwd, target, name, desc){}, // Object.defineProperty(target, name, desc)
apply: function(fwd, target, args, rcvr){}, // target.apply(rcvr, args)
construct: function(fwd, target, args){}, // new target(args...)
});
Any traps not provided in the handler will default to forwarding to the target.
The first parameter, fwd
is a function that when called will forward the action to the target and return the result. The forward function also has two properties to modify what it does
target
and rcvr
)FAQs
A Proxy handler maker that drastically simplifies making and using Harmony Proxies by combining traps and normalizing their arguments.
The npm package easy-proxy receives a total of 6 weekly downloads. As such, easy-proxy popularity was classified as not popular.
We found that easy-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.