New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rxprotoplex

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rxprotoplex - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

index.js

@@ -15,7 +15,6 @@ export * from "./lib/onConnection$.js";

export * from "./lib/consumePlexStream.js";
export * from "./lib/onConnectionAndRead$.js";
// export useful functionalities.
export * from "./lib/get.js";
export {onConnectionAndRead$} from "./lib/onConnectionAndRead$.js";
export * from "./lib/get.js";

20

lib/listenAndConnection$.js
import {plexIdConfigOrganizeArguments} from "./plexIdConfigOrganizeArguments.js";
import {fromEventPattern} from "rxjs";
import {fromEvent, fromEventPattern, take, takeUntil} from "rxjs";
import {ofChannel} from "./ofChannel.js";
import {asPlex} from "./asPlex.js";

@@ -24,18 +25,17 @@ /**

(plex, id, config = {}) => {
const _plex = asPlex(plex);
const stream = _plex.mux.stream;
const close$ = fromEvent(stream, "close").pipe(take(1));
return fromEventPattern(
handler => {
console.log(`Listening on channel ${id}`);
return plex.listen(id, config).on("connection", handler);
return _plex.listen(id, config).on("connection", handler);
},
handler => {
try {
console.log(`Unlistening on channel ${id}`);
plex.unlisten({id, ...config});
plex.off("connection", handler);
} catch (e) {
debugger;
}
console.log(`Unlistening on channel ${id}`);
_plex.unlisten({id, ...config});
_plex.off("connection", handler);
}
).pipe(ofChannel({id, protocol: config.protocol}));
).pipe(takeUntil(close$), ofChannel({id, protocol: config.protocol}));
}
);
{
"name": "rxprotoplex",
"version": "1.0.3",
"version": "1.0.4",
"description": "A utility library for working with Plex-based connections and streams with RxJS operators.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc