Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eduardorothdev/rxjs-mqtt

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eduardorothdev/rxjs-mqtt - npm Package Compare versions

Comparing version 1.0.12 to 1.1.0

1

dist/index.d.ts

@@ -12,2 +12,3 @@ import { IClientOptions, IClientReconnectOptions, ISubscriptionMap, MqttClient, Packet, PacketCallback } from "mqtt";

publish(...args: [string, string | Buffer]): Promise<unknown>;
publishJson(topic: string, data: JSON): Promise<unknown>;
subscribe(...args: [string | string[] | ISubscriptionMap]): Promise<unknown>;

@@ -14,0 +15,0 @@ unsubscribe(...args: [string | string[]]): Promise<unknown>;

@@ -35,2 +35,12 @@ "use strict";

}
publishJson(topic, data) {
return new Promise((resolve, reject) => {
this._client.publish(topic, JSON.stringify(data), (err, result) => {
if (err)
reject(err);
else
resolve(result);
});
});
}
subscribe(...args) {

@@ -37,0 +47,0 @@ return new Promise((resolve, reject) => {

2

package.json
{
"name": "@eduardorothdev/rxjs-mqtt",
"version": "1.0.12",
"version": "1.1.0",
"description": "RxJS wrapper for MQTT. Based on async-mqtt",

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

@@ -49,2 +49,11 @@ import {

publishJson(topic: string, data: JSON) {
return new Promise((resolve, reject) => {
this._client.publish(topic, JSON.stringify(data), (err, result) => {
if (err) reject(err);
else resolve(result);
});
});
}
subscribe(...args: [string | string[] | ISubscriptionMap]) {

@@ -51,0 +60,0 @@ return new Promise((resolve, reject) => {

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