node-opcua-numeric-range
Advanced tools
Comparing version 0.7.3 to 0.7.4
{ | ||
"name": "node-opcua-numeric-range", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "pure nodejs OPCUA SDK - module -numeric-range", | ||
@@ -13,12 +13,12 @@ "main": "src/numeric_range.js", | ||
"node-opcua-assert": "^0.7.0", | ||
"node-opcua-basic-types": "^0.7.3", | ||
"node-opcua-enum": "^0.7.2", | ||
"node-opcua-factory": "^0.7.3", | ||
"node-opcua-status-code": "^0.7.3", | ||
"node-opcua-basic-types": "^0.7.4", | ||
"node-opcua-enum": "^0.7.4", | ||
"node-opcua-factory": "^0.7.4", | ||
"node-opcua-status-code": "^0.7.4", | ||
"underscore": "^1.9.1" | ||
}, | ||
"devDependencies": { | ||
"node-opcua-generator": "^0.7.3", | ||
"node-opcua-nodeid": "^0.7.2", | ||
"node-opcua-packet-analyzer": "^0.7.3", | ||
"node-opcua-generator": "^0.7.4", | ||
"node-opcua-nodeid": "^0.7.4", | ||
"node-opcua-packet-analyzer": "^0.7.4", | ||
"node-opcua-test-helpers": "^0.7.0", | ||
@@ -40,3 +40,3 @@ "should": "13.2.3" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "e7ed2b6dc6c717c8d42d0bbd07018414dfc00b6e" | ||
"gitHead": "7a85ad8e37b709283fcfe19d93e39dc7e193633e" | ||
} |
@@ -388,2 +388,5 @@ /* global NumericRange*/ | ||
if (index >= array.length) { | ||
if (typeof array === "string") { | ||
return {array: "", statusCode: StatusCodes.BadIndexRangeNoData}; | ||
} | ||
return {array: [], statusCode: StatusCodes.BadIndexRangeNoData}; | ||
@@ -402,2 +405,5 @@ } | ||
if (low_index >= array.length) { | ||
if (typeof array === "string") { | ||
return {array: "", statusCode: StatusCodes.BadIndexRangeNoData}; | ||
} | ||
return {array: [], statusCode: StatusCodes.BadIndexRangeNoData}; | ||
@@ -404,0 +410,0 @@ } |
@@ -208,2 +208,21 @@ /*global describe,require,it */ | ||
it("it should return a statusCode and empty string if numeric range is out of bound - issue #635", function () { | ||
const nr = new NumericRange(20, 40); | ||
referenceString.length.should.eql(11); | ||
const r = nr.extract_values(referenceString); | ||
r.array.should.eql(""); | ||
r.statusCode.should.eql(StatusCodes.BadIndexRangeNoData); | ||
referenceString.length.should.eql(11); | ||
}); | ||
it("it should return a statusCode and empty string if numeric range (single element) is out of bound - issue #635", function () { | ||
const nr = new NumericRange(20); | ||
referenceString.length.should.eql(11); | ||
const r = nr.extract_values(referenceString); | ||
r.array.should.eql(""); | ||
r.statusCode.should.eql(StatusCodes.BadIndexRangeNoData); | ||
referenceString.length.should.eql(11); | ||
}); | ||
it("it should extract a sub matrix when indexRange is a NumericRange.Matrix", function () { | ||
@@ -210,0 +229,0 @@ |
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
61026
1220
Updatednode-opcua-enum@^0.7.4
Updatednode-opcua-factory@^0.7.4