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

@psdk/ohos-bluetooth-le

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@psdk/ohos-bluetooth-le - npm Package Compare versions

Comparing version 0.5.20 to 0.5.21

21

build/connected.js
// @ts-nocheck
import { CollectionKit, ConnectionState } from "@psdk/frame-father";
import Timeout from 'await-timeout';
import ble from '@ohos.bluetooth.ble';

@@ -74,4 +75,20 @@ import constant from '@ohos.bluetooth.constant';

}
read(options) {
return this.dataOfRead.pop();
async read(options) {
if (this.dataOfRead.length > 0) {
this.dataOfRead.splice(0, this.dataOfRead.length);
}
const timeout = (options?.timeout ?? 5000);
const startTime = +new Date();
while (true) {
const now = +new Date();
if (now - startTime > timeout) {
return new Uint8Array([]);
}
if (this.dataOfRead.length == 0) {
await Timeout.set(100);
continue;
}
const data = this.dataOfRead.pop();
return new Uint8Array(data);
}
}

@@ -78,0 +95,0 @@ async write(data) {

8

package.json
{
"name": "@psdk/ohos-bluetooth-le",
"version": "0.5.20",
"version": "0.5.21",
"description": "psdk - ohos bluetooth le device support",

@@ -27,4 +27,4 @@ "main": "build/index.js",

"dependencies": {
"@psdk/device-bluetooth-traits": "0.5.20",
"@psdk/frame-father": "0.5.20",
"@psdk/device-bluetooth-traits": "0.5.21",
"@psdk/frame-father": "0.5.21",
"await-timeout": "^1.1.1"

@@ -37,3 +37,3 @@ },

],
"gitHead": "da9fa7627da04e3d4f3794f51b3c93a6626bdd9d"
"gitHead": "1746a624a1de144d6a7c134b5b07c20e93e004bc"
}

Sorry, the diff of this file is not supported yet

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