node-opcua-data-model
Advanced tools
Comparing version 2.0.0-alpha.12 to 2.0.0-alpha.13
/** | ||
* @module node-opcua-data-model | ||
*/ | ||
import { QualifiedNameLike } from "./qualified_name"; | ||
export declare function isDataEncoding(dataEncoding: any): boolean; | ||
export declare function isValidDataEncoding(dataEncoding?: string | null): boolean; | ||
export declare function isValidDataEncoding(dataEncoding?: string | null | QualifiedNameLike): boolean; |
"use strict"; | ||
/** | ||
* @module node-opcua-data-model | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -12,2 +9,8 @@ function isDataEncoding(dataEncoding) { | ||
function isValidDataEncoding(dataEncoding) { | ||
if (!dataEncoding) { | ||
return true; | ||
} | ||
if (dataEncoding.name) { | ||
dataEncoding = dataEncoding.name; | ||
} | ||
if (dataEncoding && (dataEncoding.name || dataEncoding.text)) { | ||
@@ -14,0 +17,0 @@ // tslint:disable:no-console |
{ | ||
"name": "node-opcua-data-model", | ||
"version": "2.0.0-alpha.12", | ||
"version": "2.0.0-alpha.13", | ||
"description": "pure nodejs OPCUA SDK - module -data-model", | ||
@@ -14,14 +14,14 @@ "scripts": { | ||
"node-opcua-assert": "^2.0.0-alpha.10", | ||
"node-opcua-basic-types": "^2.0.0-alpha.12", | ||
"node-opcua-binary-stream": "^2.0.0-alpha.12", | ||
"node-opcua-basic-types": "^2.0.0-alpha.13", | ||
"node-opcua-binary-stream": "^2.0.0-alpha.13", | ||
"node-opcua-enum": "^2.0.0-alpha.10", | ||
"node-opcua-factory": "^2.0.0-alpha.12", | ||
"node-opcua-nodeid": "^2.0.0-alpha.11", | ||
"node-opcua-status-code": "^2.0.0-alpha.12", | ||
"node-opcua-utils": "^2.0.0-alpha.12", | ||
"node-opcua-factory": "^2.0.0-alpha.13", | ||
"node-opcua-nodeid": "^2.0.0-alpha.13", | ||
"node-opcua-status-code": "^2.0.0-alpha.13", | ||
"node-opcua-utils": "^2.0.0-alpha.13", | ||
"underscore": "^1.9.1" | ||
}, | ||
"devDependencies": { | ||
"node-opcua-generator": "^2.0.0-alpha.12", | ||
"node-opcua-packet-analyzer": "^2.0.0-alpha.12", | ||
"node-opcua-generator": "^2.0.0-alpha.13", | ||
"node-opcua-packet-analyzer": "^2.0.0-alpha.13", | ||
"should": "13.2.3", | ||
@@ -45,3 +45,3 @@ "source-map-support": "^0.5.10" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "61699a99c75c631388f2e8d8e33eb209649c5eac" | ||
"gitHead": "6a0c56afb819a44d5abd453d39ce684df6fb3505" | ||
} |
/** | ||
* @module node-opcua-data-model | ||
*/ | ||
import { QualifiedName, QualifiedNameLike } from "./qualified_name"; | ||
@@ -10,4 +11,11 @@ export function isDataEncoding(dataEncoding: any): boolean { | ||
const validEncoding = ["DefaultBinary", "DefaultXml"]; | ||
export function isValidDataEncoding(dataEncoding?: string | null): boolean { | ||
export function isValidDataEncoding(dataEncoding?: string | null | QualifiedNameLike): boolean { | ||
if (!dataEncoding) { | ||
return true; | ||
} | ||
if ((dataEncoding as any).name) { | ||
dataEncoding = (dataEncoding as QualifiedName).name; | ||
} | ||
if (dataEncoding && ((dataEncoding as any).name || (dataEncoding as any).text) ) { | ||
@@ -14,0 +22,0 @@ // tslint:disable:no-console |
Sorry, the diff of this file is not supported yet
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
113731
2205