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

tuyapi

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tuyapi - npm Package Compare versions

Comparing version 6.1.2 to 6.1.3

24

index.js

@@ -270,19 +270,17 @@ // Import packages

_send(buffer) {
// Make sure we're connected
if (!this.isConnected()) {
throw new Error('No connection has been made to the device.');
}
// Retry up to 5 times
return pRetry(() => {
return new Promise((resolve, reject) => {
try {
// Send data
this.client.write(buffer);
// Send data
this.connect().then(() => {
try {
this.client.write(buffer);
// Add resolver function
this._resolvers[this._currentSequenceN] = data => resolve(data);
} catch (error) {
reject(error);
}
// Add resolver function
this._resolvers[this._currentSequenceN] = data => resolve(data);
} catch (error) {
reject(error);
}
})
.catch(error => reject(error));
});

@@ -289,0 +287,0 @@ }, {retries: 5});

{
"name": "tuyapi",
"version": "6.1.2",
"version": "6.1.3",
"description": "An easy-to-use API for devices that use Tuya's cloud services",

@@ -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