
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.
@rainder/co-event-emitter
Advanced tools
Subscribes for an event. CoEventEmitter allows to subscribe for an event only once. Throws an Error if there is already a listener for an event.
Examples:
//GeneratorFunction implementation
events.on('event-name', function *() {
return 'result';
});
//Async/Await implementation
events.on('event-name', async function () {
return 'result';
});
//Thunk implementation
events.on('event-name', (cb) => {
cb(null, 'result');
});
//Promise implementation
events.on('event-name', new Promise((resolve, reject) => {
resolve('result');
}));
//Promise v2 implementation
events.on('event-name', () => {
return Promise.resolve('result');
});
events.emit('event-name', 'hello world')
.then((result) => console.log(result)); //'hello world'
Removes a subscription for an event. Throws an error if no event listener found.
events.off('event-name');
Return true if there is a registered listener for a provided event.
events.has('event-name');
Emits an event and returns a promise. Throws an error if no event listener found.
events.call('event-name')
.then((result) => { /* handle result */ })
.catch((err) => { /* handle err */ });
}
Emits an event. Returns a boolean value indicating if listener have been found.
events.emit('event-name');
FAQs
co event emitter
We found that @rainder/co-event-emitter 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.
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.