
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
most.js Web Messaging - event streams for WebSockets, EventSource, MessageChannel, Worker, etc.
Create a most.js stream from a WebSocket (or SockJS, etc.), EventSource, MessagePort (or anything with the postMessage() API), or Worker and get all the filtering, transforming, reducing, etc goodness:
var fromWebSocket = require('most-w3msg').fromWebSocket;
var socket1 = new WebSocket('ws://localhost:8001');
var socket2 = new WebSocket('ws://localhost:8002');
// Merge 2 websockets into a single stream
// When the merged stream ends, both socket1.close and socket2.close
// will be called.
var stream = fromWebSocket(socket1, socket1.close.bind(socket1))
.merge(fromWebSocket(socket2, socket2.close.bind(socket2));
// Log the first 10 items that meet the awesomeness criteria
// regardless of which socket they come from
stream.map(JSON.parse)
.filter(function(item) {
return item.awesomeness > 42;
})
.take(10)
.forEach(function(awesomeItem) {
console.log(awesomeItem);
});
####fromWebSocket(webSocket [, dispose]) -> Stream
Create a stream from a WebSocket. The stream will contain all messages received by the WebSocket from the time a consumer begins observing the stream (using observe, .forEach or .reduce). The stream will end when the WebSocket closes, or will error if the WebSocket errors.
fromWebSocket does not close the WebSocket automatically. You can pass-in a dispose function if you want to close the socket when the stream ends or once all consumers of the stream have lost interest:
var stream = fromWebSocket(socket, socket.close.bind(socket));
####toWebSocket(stream, webSocket) -> Promise
Send all events from a stream to a WebSocket, and return a promise for the end of the stream.
If the WebSocket closes before the stream ends, the returned promise will fulfill if the WebSocket closes cleanly, or will reject if the WebSocket errors. If the stream ends before the WebSocket closes, the returned promise will fulfill if the stream ends cleanly, or will reject if the stream errors.
toWebSocket does not close the WebSocket automatically. The creator of the WebSocket should close it.
####fromEventSource(eventSource [, dispose]) -> Stream
####fromEventSourceOn(eventName, eventSource [, dispose]) -> Stream
####fromMessagePort(port [, dispose]) -> Stream
####toMessagePort(stream, port) -> Promise
####fromWorker(worker [, dispose]) -> Stream
####toWorker(worker, port) -> Promise
FAQs
most.js Web Messaging - event streams for WebSockets, EventSource, MessageChannel, Worker, etc.
We found that most-w3msg 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
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.