
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Distributed network-based event emitter for NodeJS.
NOTE: This is totally work in progress, and you should NOT rely on this for anything right now.
$ npm install happening
Note that happening
depends on One, a distributed message queue based on ØMQ. So, if you're having a hard time installing, refer to its installation instructions.
You can use happening
just like you would with any other event emitter. Here's a quick example:
var Happening = require('happening');
var happening = Happening.create(function (err) {
if (err) {
throw err;
}
happening.on('my_event', function (param1, param2) {
console.log('got called with', param1, 'and', param2);
});
setInterval(function () {
happening.emit('my_event', 'this', 'that');
}, 500);
});
Here's a list of things you should keep in mind when using happening
.
Any emitter you create will join other emitters on the same network automatically, and act as one logical emitter. If you need multiple logical emitters, you can specify a namespace
option:
var Happening = require('happening');
var happening = Happening.create({
namespace: 'my_own_namespace'
}, function (err) {
if (err) {
throw err;
}
happening.on('my_event', function (param1, param2) {
console.log('got called with', param1, 'and', param2);
});
setInterval(function () {
happening.emit('my_event', 'this', 'that');
}, 500);
});
This emitter will only join other emitters that belong to the same namespace
.
If you add once()
listeners on two separate nodes of the emitter, both will run once. Remember that in practice, you ran once()
twice.
happening
takes a few milliseconds to get up an running, which is why you have asynchronous create()
, which will only call back once emitter has connected to at least one other node. If you want to raise the number of nodes it should wait for, you can pass a readyThreshold
option, like so:
var Happening = require('happening');
var happening = Happening.create({
readyThreshold: 3
}, function (err) {
if (err) {
throw err;
}
console.log('found at least 3 nodes!');
});
Released under the MIT License.
FAQs
Distributed network-based event emitter
We found that happening demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
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.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.