azure-iot-common
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -6,2 +6,4 @@ // Copyright (c) Microsoft. All rights reserved. | ||
var apiVersion = '2016-11-14'; | ||
function devicePath(id) { | ||
@@ -24,3 +26,3 @@ return '/devices/' + id; | ||
function versionQueryString() { | ||
return '?api-version=2016-11-14'; | ||
return '?api-version=' + apiVersion; | ||
} | ||
@@ -33,5 +35,6 @@ | ||
feedbackPath: feedbackPath, | ||
versionQueryString: versionQueryString | ||
versionQueryString: versionQueryString, | ||
apiVersion: apiVersion | ||
}; | ||
module.exports = endpoint; |
@@ -57,2 +57,18 @@ // Copyright (c) Microsoft. All rights reserved. | ||
/** | ||
* Returns the value property of the element that has the given key. | ||
* @returns {Object} corresponding value or undefined if the key doesn't exist. | ||
*/ | ||
Properties.prototype.getValue = function (key) { | ||
for (var i = 0; i < this.propertyList.length; i++) { | ||
/*Codes_SRS_NODE_IOTHUB_PROPERTIES_16_002: [`Properties.getValue` should return the corresponding value of the `value` property of the element with the `key` property passed as argument.]*/ | ||
if (this.propertyList[i].key === key) { | ||
return this.propertyList[i].value; | ||
} | ||
} | ||
/*Codes_SRS_NODE_IOTHUB_PROPERTIES_16_001: [`Properties.getValue` should return `undefined` if no element within the `propertyList` array contains `key`.]*/ | ||
return undefined; | ||
}; | ||
/** | ||
* Returns the number of items in the collection. | ||
@@ -59,0 +75,0 @@ */ |
{ | ||
"name": "azure-iot-common", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Common components shared by Azure IoT device and service SDKs", | ||
@@ -5,0 +5,0 @@ "author": "Microsoft Corporation", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44894
949