node-opcua-numeric-range
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { UAString } from "node-opcua-basic-types"; |
@@ -287,2 +287,14 @@ "use strict"; | ||
isValid() { | ||
if (this.type === NumericRangeType.ArrayRange) { | ||
const value = this.value; | ||
if (value[0] < 0 || value[1] < 0) { | ||
return false; | ||
} | ||
} | ||
if (this.type === NumericRangeType.SingleValue) { | ||
const value = this.value; | ||
if (value < 0) { | ||
return false; | ||
} | ||
} | ||
return this.type !== NumericRangeType.InvalidRange; | ||
@@ -289,0 +301,0 @@ } |
{ | ||
"name": "node-opcua-numeric-range", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "pure nodejs OPCUA SDK - module -numeric-range", | ||
@@ -15,5 +15,5 @@ "main": "./dist/index.js", | ||
"node-opcua-assert": "^2.3.0", | ||
"node-opcua-basic-types": "^2.3.0", | ||
"node-opcua-basic-types": "^2.4.0", | ||
"node-opcua-binary-stream": "^2.3.0", | ||
"node-opcua-factory": "^2.3.0", | ||
"node-opcua-factory": "^2.4.0", | ||
"node-opcua-status-code": "^2.3.0", | ||
@@ -24,3 +24,3 @@ "underscore": "^1.9.1" | ||
"node-opcua-nodeid": "^2.3.0", | ||
"node-opcua-packet-analyzer": "^2.3.0", | ||
"node-opcua-packet-analyzer": "^2.4.0", | ||
"node-opcua-test-helpers": "^2.0.0", | ||
@@ -42,3 +42,3 @@ "should": "13.2.3" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "3fc22180b26cd0d0481e57e7bb6a2cab7623e6d1" | ||
"gitHead": "21f5967e799ef2b4d6491b8fc670964127c11431" | ||
} |
@@ -0,0 +0,0 @@ /** |
@@ -232,3 +232,3 @@ /** | ||
switch (numericalRange.type) { | ||
case NumericRangeType.MatrixRange: | ||
case NumericRangeType.MatrixRange: | ||
if (numericalRange.value === null) { | ||
@@ -382,2 +382,15 @@ throw new Error("Internal Error"); | ||
public isValid(): boolean { | ||
if (this.type === NumericRangeType.ArrayRange) { | ||
const value = this.value as number[]; | ||
if (value[0] < 0 || value[1] < 0) { | ||
return false; | ||
} | ||
} | ||
if (this.type === NumericRangeType.SingleValue) { | ||
const value = this.value as number; | ||
if (value < 0) { | ||
return false; | ||
} | ||
} | ||
return this.type !== NumericRangeType.InvalidRange; | ||
@@ -384,0 +397,0 @@ } |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
216001
1349
Updatednode-opcua-factory@^2.4.0