
Research
GemStuffer Campaign Abuses RubyGems as Exfiltration Channel Targeting UK Local Government
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.
msg-pubsub is a simple events dispatcher publish / subscribe library (just 0.9kb). aysnc, simple and usefull.
English | 简体ä¸ć–‡
msg-pubsub is a simple js lib (only
0.9kb) for dispatching message by publish/subscribe pattern.
Can be used in:
1. pub(msg_name, data1, data2, ...)
Async subscribe the message named msg_name, and with datas as the input of callback function.
2. pubSync(msg_name, data1, data2, ...)
Sync subscribe the message named msg_name, and with datas as the input of callback function, blocking.
3. sub(msg_name, callback, context)
Subscribe the msg_name with callback. callback function will execute when the message named msg_name published.
This function will return the msgObj which can be used to cancel bind with the API un(msgObj).
4. subOnce(msg_name, callback, context)
Subscribe the msg_name with callback. It will be expired once Ttriggered.
Only can be triggered once, then it will be deleted automation.
5. unsub(msgObj / msg_name)
Cancel subscribe message. You can unsubscribe a message Object, or just unsubscribe a msg_name, or unsubscribe the callback function.
6. clear()
Clear all message/events.
npm i msg-pubsub
You can import it with <script> tag, or use keyword require or import.
import msg from 'msg-pubsub';
// or
var msg = require("msg-pubsub");
Use pub method to publish message, use sub method to subscribe message, unsub to unsubscribe.
import msg from 'msg-pubsub';
function test_callback(data1, data2) {
console.log('this is msg 1');
}
// publish message
msg.pub('test_msg', 'test_data1', 'test_data2');
// subscribe message
var msgObj = msg.sub('test_msg', test_callback);
var msgObj2 = msg.sub('test_msg', function(data1, data2) {
console.log('this is msg 2');
});
// cancel message
msg.unsub(msgObj); // cancel message
msg.unsub('test_msg'); // cancel all messages called `test_msg`.
msg.unsub(test_callback); // cancel all `test_callback` methods.
FAQs
msg-pubsub is a simple events dispatcher publish / subscribe library (just 0.9kb). aysnc, simple and usefull.
The npm package msg-pubsub receives a total of 6 weekly downloads. As such, msg-pubsub popularity was classified as not popular.
We found that msg-pubsub 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
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.

Research
Socket detected 84 compromised TanStack npm package artifacts modified with suspected CI credential-stealing malware.