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

node-opcua-numeric-range

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-numeric-range - npm Package Compare versions

Comparing version 2.88.0 to 2.89.0

4

dist/numeric_range.d.ts

@@ -21,3 +21,3 @@ /// <reference types="node" />

}
declare type NumericalRangeValueType = null | number | string | number[] | number[][];
type NumericalRangeValueType = null | number | string | number[] | number[][];
export interface NumericalRangeSingleValue {

@@ -43,3 +43,3 @@ type: NumericRangeType.SingleValue;

}
export declare type NumericalRange0 = NumericalRangeSingleValue | NumericalRangeArrayRange | NumericalRangeMatrixRange | NumericalRangeEmpty | NumericalRangeInvalid;
export type NumericalRange0 = NumericalRangeSingleValue | NumericalRangeArrayRange | NumericalRangeMatrixRange | NumericalRangeEmpty | NumericalRangeInvalid;
export interface NumericalRange1 {

@@ -46,0 +46,0 @@ type: NumericRangeType;

@@ -225,2 +225,25 @@ "use strict";

class NumericRange {
static overlap(nr1, nr2) {
nr1 = nr1 || NumericRange.empty;
nr2 = nr2 || NumericRange.empty;
if (NumericRangeType.Empty === nr1.type || NumericRangeType.Empty === nr2.type) {
return true;
}
if (NumericRangeType.SingleValue === nr1.type && NumericRangeType.SingleValue === nr2.type) {
return nr1.value === nr2.value;
}
if (NumericRangeType.ArrayRange === nr1.type && NumericRangeType.ArrayRange === nr2.type) {
// +-----+ +------+ +---+ +------+
// +----+ +---+ +--------+ +---+
const l1 = nr1.value[0];
const h1 = nr1.value[1];
const l2 = nr2.value[0];
const h2 = nr2.value[1];
return _overlap(l1, h1, l2, h2);
}
// istanbul ignore next
(0, node_opcua_assert_1.assert)(false, "NumericalRange#overlap : case not implemented yet "); // TODO
// istanbul ignore next
return false;
}
constructor(value, secondValue) {

@@ -254,25 +277,2 @@ this.type = NumericRangeType.InvalidRange;

}
static overlap(nr1, nr2) {
nr1 = nr1 || NumericRange.empty;
nr2 = nr2 || NumericRange.empty;
if (NumericRangeType.Empty === nr1.type || NumericRangeType.Empty === nr2.type) {
return true;
}
if (NumericRangeType.SingleValue === nr1.type && NumericRangeType.SingleValue === nr2.type) {
return nr1.value === nr2.value;
}
if (NumericRangeType.ArrayRange === nr1.type && NumericRangeType.ArrayRange === nr2.type) {
// +-----+ +------+ +---+ +------+
// +----+ +---+ +--------+ +---+
const l1 = nr1.value[0];
const h1 = nr1.value[1];
const l2 = nr2.value[0];
const h2 = nr2.value[1];
return _overlap(l1, h1, l2, h2);
}
// istanbul ignore next
(0, node_opcua_assert_1.assert)(false, "NumericalRange#overlap : case not implemented yet "); // TODO
// istanbul ignore next
return false;
}
isValid() {

@@ -279,0 +279,0 @@ if (this.type === NumericRangeType.ArrayRange) {

{
"name": "node-opcua-numeric-range",
"version": "2.88.0",
"version": "2.89.0",
"description": "pure nodejs OPCUA SDK - module -numeric-range",

@@ -18,9 +18,9 @@ "main": "./dist/index.js",

"node-opcua-assert": "2.88.0",
"node-opcua-basic-types": "2.88.0",
"node-opcua-binary-stream": "2.88.0",
"node-opcua-factory": "2.88.0",
"node-opcua-status-code": "2.88.0"
"node-opcua-basic-types": "2.89.0",
"node-opcua-binary-stream": "2.89.0",
"node-opcua-factory": "2.89.0",
"node-opcua-status-code": "2.89.0"
},
"devDependencies": {
"node-opcua-packet-analyzer": "2.88.0",
"node-opcua-packet-analyzer": "2.89.0",
"node-opcua-test-helpers": "2.88.0",

@@ -42,3 +42,3 @@ "should": "^13.2.3"

"homepage": "http://node-opcua.github.io/",
"gitHead": "0c20078b474f36855b799557f8fe931dbe20c2ca"
"gitHead": "93d5502a1b71afbb5e5fa56846615c412b63cc1b"
}

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