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

cordova-plugin-chrome-apps-bluetoothlowenergy

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-chrome-apps-bluetoothlowenergy - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

CONTRIBUTING.md

32

bluetoothLowEnergy.js

@@ -50,6 +50,32 @@ // Copyright (c) 2014 The Chromium Authors. All rights reserved.

exports.getServices = function(deviceAddress, callback) {
exec(callback, fail(callback), 'ChromeBluetoothLowEnergy', 'getServices', [deviceAddress]);
};
exports.getServices = (function() {
// A Map stores getServices' callbacks. Key is the deviceAddress, and value
// is an array of callback.
var getServicesCallbacks = {};
return function(deviceAddress, callback) {
if (getServicesCallbacks[deviceAddress] !== undefined) {
getServicesCallbacks[deviceAddress].push(callback);
} else {
getServicesCallbacks[deviceAddress] = [callback];
var handleWin = function(arg) {
getServicesCallbacks[deviceAddress].forEach(function(callback) {
callback(arg);
});
delete getServicesCallbacks[deviceAddress];
};
var handleFail = function(arg) {
getServicesCallbacks[deviceAddress].forEach(function(callback) {
(fail(callback)(arg));
});
delete getServicesCallbacks[deviceAddress];
};
exec(handleWin, handleFail, 'ChromeBluetoothLowEnergy', 'getServices', [deviceAddress]);
}
};
}());
exports.getCharacteristic = function(characteristicId, callback) {

@@ -56,0 +82,0 @@ var win = callback && function(uuid, service, properties, instanceId, value) {

2

package.json
{
"name": "cordova-plugin-chrome-apps-bluetoothlowenergy",
"version": "1.0.2",
"version": "1.0.3",
"description": "This plugin implements the [chrome.bluetoothLowEnergy](https://developer.chrome.com/apps/bluetoothLowEnergy) API for iOS and Android.",

@@ -5,0 +5,0 @@ "cordova": {

@@ -11,2 +11,5 @@ # chrome.bluetoothLowEnergy Plugin

## 1.0.3 (Nov 10, 2015)
- Fix concurrent getServices calls for same device not working (Android)
## 1.0.2 (April 30, 2015)

@@ -13,0 +16,0 @@ - Renamed plugin to pubilsh to NPM

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