
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
This is an implementation of the mediator pattern in JavaScript. I don't how many of you make these yourself or if you use browser native JavaScript events to achieve this type of functionality. I've posted it here to get your insights and knowledge so that we can make it better together =).
By using regular functions instead of native browser events, we're able to use mediator.js in both browsers and node.js. I don't know about the difference in performance though. Please enlighten me! =)
var mediator = new Mediator();
mediator.bind('hello', function (name) {
console.log('Hello ' + name);
});
mediator.bind('hello:kid', function () {
console.log('...eat your porridge');
});
mediator.trigger('hello', 'Niklas');
mediator.trigger('hello:kid', 'Martin');
//Output
Hello Niklas
Hello Martin
...eat your porridge
FAQs
An implementation of the mediator pattern in JavaScript
We found that talkative 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.