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

node-opcua-data-model

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-data-model - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

70

_generated_/_auto_generated_DiagnosticInfo.js

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:12.206Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:33.278Z
"use strict";

@@ -6,22 +6,22 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/DiagnosticInfo_schema").DiagnosticInfo_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/DiagnosticInfo_schema").DiagnosticInfo_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -34,9 +34,2 @@ /**

* @param options {Object}
* @param [options.namespaceUri = -1] {Int32} The symbolicId is defined within the context of a namespace.
* @param [options.symbolicId = -1] {Int32} The symbolicId shall be used to identify a vendor-specific error or condition
* @param [options.locale = -1] {Int32} The locale part of the vendor-specific localized text describing the symbolic id.
* @param [options.localizedText = -1] {Int32}
* @param [options.additionalInfo = null] {String} Vendor-specific diagnostic information.
* @param [options.innerStatusCode = 0] {StatusCode} The StatusCode from the inner operation.
* @param [options.innerDiagnosticInfo = null] {DiagnosticInfo} The diagnostic info associated with the inner StatusCode.
*/

@@ -48,3 +41,3 @@ function DiagnosticInfo(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -122,8 +115,8 @@ resolve_schema_field_types(schema);

var encode_Int32 = _defaultTypeMap.Int32.encode;
var decode_Int32 = _defaultTypeMap.Int32.decode;
var encode_String = _defaultTypeMap.String.encode;
var decode_String = _defaultTypeMap.String.decode;
var encode_StatusCode = _defaultTypeMap.StatusCode.encode;
var decode_StatusCode = _defaultTypeMap.StatusCode.decode;
const encode_Int32 = _defaultTypeMap.Int32.encode;
const decode_Int32 = _defaultTypeMap.Int32.decode;
const encode_String = _defaultTypeMap.String.encode;
const decode_String = _defaultTypeMap.String.decode;
const encode_StatusCode = _defaultTypeMap.StatusCode.encode;
const decode_StatusCode = _defaultTypeMap.StatusCode.decode;
DiagnosticInfo.prototype.encode = function(stream,options) {

@@ -137,6 +130,5 @@ schema.encode(this,stream,options);

* @param stream {BinaryStream}
* @param [option] {object}
*/
DiagnosticInfo.prototype.decode = function(stream,options) {
schema.decode(this,stream,options);
DiagnosticInfo.prototype.decode = function(stream) {
schema.decode(this,stream);
};

@@ -158,3 +150,3 @@ DiagnosticInfo.prototype.decode_debug = function(stream,options) {

exports.DiagnosticInfo = DiagnosticInfo;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("DiagnosticInfo",DiagnosticInfo);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:12.214Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:33.285Z
"use strict";

@@ -6,23 +6,23 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/EnumValueType_schema").EnumValueType_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var LocalizedText = require("./_auto_generated_LocalizedText").LocalizedText;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/EnumValueType_schema").EnumValueType_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const LocalizedText = require("./_auto_generated_LocalizedText").LocalizedText;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -35,5 +35,2 @@ /**

* @param options {Object}
* @param [options.value] {Int64} The Integer representation of an Enumeration.
* @param [options.displayName] {LocalizedText} A human-readable representation of the Value of the Enumeration.
* @param [options.description] {LocalizedText} A localized description of the enumeration value. This field can contain an empty string if no description is available
*/

@@ -45,3 +42,3 @@ function EnumValueType(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -86,4 +83,4 @@ resolve_schema_field_types(schema);

var encode_Int64 = _defaultTypeMap.Int64.encode;
var decode_Int64 = _defaultTypeMap.Int64.decode;
const encode_Int64 = _defaultTypeMap.Int64.encode;
const decode_Int64 = _defaultTypeMap.Int64.decode;
/**

@@ -107,10 +104,9 @@ * encode the object into a binary stream

* @param stream {BinaryStream}
* @param [option] {object}
*/
EnumValueType.prototype.decode = function(stream,options) {
EnumValueType.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.value = decode_Int64(stream,options);
this.displayName.decode(stream,options);
this.description.decode(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.value = decode_Int64(stream);
this.displayName.decode(stream);
this.description.decode(stream);
};

@@ -125,3 +121,3 @@ EnumValueType.possibleFields = [

exports.EnumValueType = EnumValueType;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("EnumValueType",EnumValueType);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:12.169Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:33.232Z
"use strict";

@@ -6,22 +6,22 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/LocalizedText_schema").LocalizedText_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/LocalizedText_schema").LocalizedText_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -34,4 +34,2 @@ /**

* @param options {Object}
* @param [options.text = null] {String}
* @param [options.locale] {LocaleId}
*/

@@ -43,3 +41,3 @@ function LocalizedText(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -76,6 +74,6 @@ resolve_schema_field_types(schema);

var encode_String = _defaultTypeMap.String.encode;
var decode_String = _defaultTypeMap.String.decode;
var encode_LocaleId = _defaultTypeMap.LocaleId.encode;
var decode_LocaleId = _defaultTypeMap.LocaleId.decode;
const encode_String = _defaultTypeMap.String.encode;
const decode_String = _defaultTypeMap.String.decode;
const encode_LocaleId = _defaultTypeMap.LocaleId.encode;
const decode_LocaleId = _defaultTypeMap.LocaleId.decode;
LocalizedText.prototype.encode = function(stream,options) {

@@ -89,6 +87,5 @@ schema.encode(this,stream,options);

* @param stream {BinaryStream}
* @param [option] {object}
*/
LocalizedText.prototype.decode = function(stream,options) {
schema.decode(this,stream,options);
LocalizedText.prototype.decode = function(stream) {
schema.decode(this,stream);
};

@@ -105,3 +102,3 @@ LocalizedText.prototype.decode_debug = function(stream,options) {

exports.LocalizedText = LocalizedText;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("LocalizedText",LocalizedText);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:12.187Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:33.255Z
"use strict";

@@ -6,22 +6,22 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/QualifiedName_schema").QualifiedName_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/QualifiedName_schema").QualifiedName_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -34,4 +34,2 @@ /**

* @param options {Object}
* @param [options.namespaceIndex] {UInt16} The namespace index
* @param [options.name = null] {String} The name
*/

@@ -43,3 +41,3 @@ function QualifiedName(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -78,6 +76,6 @@ resolve_schema_field_types(schema);

var encode_UInt16 = _defaultTypeMap.UInt16.encode;
var decode_UInt16 = _defaultTypeMap.UInt16.decode;
var encode_String = _defaultTypeMap.String.encode;
var decode_String = _defaultTypeMap.String.decode;
const encode_UInt16 = _defaultTypeMap.UInt16.encode;
const decode_UInt16 = _defaultTypeMap.UInt16.decode;
const encode_String = _defaultTypeMap.String.encode;
const decode_String = _defaultTypeMap.String.decode;
/**

@@ -100,9 +98,8 @@ * encode the object into a binary stream

* @param stream {BinaryStream}
* @param [option] {object}
*/
QualifiedName.prototype.decode = function(stream,options) {
QualifiedName.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.namespaceIndex = decode_UInt16(stream,options);
this.name = decode_String(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.namespaceIndex = decode_UInt16(stream);
this.name = decode_String(stream);
};

@@ -116,3 +113,3 @@ QualifiedName.possibleFields = [

exports.QualifiedName = QualifiedName;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("QualifiedName",QualifiedName);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:12.220Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:33.292Z
"use strict";

@@ -6,22 +6,22 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/TimeZone_schema").TimeZone_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/TimeZone_schema").TimeZone_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -34,4 +34,2 @@ /**

* @param options {Object}
* @param [options.offset] {Int16}
* @param [options.daylightSavingInOffset] {Boolean}
*/

@@ -43,3 +41,3 @@ function TimeZone(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -74,6 +72,6 @@ resolve_schema_field_types(schema);

var encode_Int16 = _defaultTypeMap.Int16.encode;
var decode_Int16 = _defaultTypeMap.Int16.decode;
var encode_Boolean = _defaultTypeMap.Boolean.encode;
var decode_Boolean = _defaultTypeMap.Boolean.decode;
const encode_Int16 = _defaultTypeMap.Int16.encode;
const decode_Int16 = _defaultTypeMap.Int16.decode;
const encode_Boolean = _defaultTypeMap.Boolean.encode;
const decode_Boolean = _defaultTypeMap.Boolean.decode;
/**

@@ -96,9 +94,8 @@ * encode the object into a binary stream

* @param stream {BinaryStream}
* @param [option] {object}
*/
TimeZone.prototype.decode = function(stream,options) {
TimeZone.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.offset = decode_Int16(stream,options);
this.daylightSavingInOffset = decode_Boolean(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.offset = decode_Int16(stream);
this.daylightSavingInOffset = decode_Boolean(stream);
};

@@ -112,3 +109,3 @@ TimeZone.possibleFields = [

exports.TimeZone = TimeZone;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("TimeZone",TimeZone);
{
"name": "node-opcua-data-model",
"version": "0.2.3",
"version": "0.3.0",
"description": "pure nodejs OPCUA SDK - module -data-model",

@@ -12,15 +12,15 @@ "scripts": {

"dependencies": {
"node-opcua-assert": "^0.2.0",
"node-opcua-basic-types": "^0.2.3",
"node-opcua-binary-stream": "^0.2.3",
"node-opcua-enum": "^0.2.3",
"node-opcua-factory": "^0.2.3",
"node-opcua-nodeid": "^0.2.3",
"node-opcua-status-code": "^0.2.3",
"node-opcua-utils": "^0.2.3",
"node-opcua-assert": "^0.3.0",
"node-opcua-basic-types": "^0.3.0",
"node-opcua-binary-stream": "^0.3.0",
"node-opcua-enum": "^0.3.0",
"node-opcua-factory": "^0.3.0",
"node-opcua-nodeid": "^0.3.0",
"node-opcua-status-code": "^0.3.0",
"node-opcua-utils": "^0.3.0",
"underscore": "^1.8.3"
},
"devDependencies": {
"node-opcua-generator": "^0.2.3",
"node-opcua-packet-analyzer": "^0.2.3",
"node-opcua-generator": "^0.3.0",
"node-opcua-packet-analyzer": "^0.3.0",
"should": "13.2.1"

@@ -27,0 +27,0 @@ },

"use strict";
var factories = require("node-opcua-factory");
var BinaryStream = require("node-opcua-binary-stream").BinaryStream;
var assert = require("node-opcua-assert");
const factories = require("node-opcua-factory");
const BinaryStream = require("node-opcua-binary-stream").BinaryStream;
const assert = require("node-opcua-assert").assert;
var EnumBrowseDirection_Schema = {
const EnumBrowseDirection_Schema = {
name: "BrowseDirection",

@@ -18,3 +18,3 @@ enumValues: {

assert(stream instanceof BinaryStream);
var value = stream.readInteger();
const value = stream.readInteger();
if (value<0 || value>2) {

@@ -21,0 +21,0 @@ return exports.BrowseDirection.Invalid;

@@ -5,13 +5,13 @@ /*

"use strict";
var assert = require('better-assert');
const assert = require('better-assert');
var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");
var ec = require("node-opcua-basic-types");
const ec = require("node-opcua-basic-types");
var QualifiedName = require("../src/qualified_name").QualifiedName;
var LocalizedText = require("../src/localized_text").LocalizedText;
const QualifiedName = require("../src/qualified_name").QualifiedName;
const LocalizedText = require("../src/localized_text").LocalizedText;
var StatusCodes = require("node-opcua-status-code").StatusCodes;
const StatusCodes = require("node-opcua-status-code").StatusCodes;

@@ -22,3 +22,3 @@

var DiagnosticInfo_EncodingByte_Schema = {
const DiagnosticInfo_EncodingByte_Schema = {
name: "DiagnosticInfo_EncodingByte",

@@ -36,3 +36,3 @@ enumValues: {

var DiagnosticInfo_EncodingByte = exports.DiagnosticInfo_EncodingByte = factories.registerEnumeration(DiagnosticInfo_EncodingByte_Schema);
const DiagnosticInfo_EncodingByte = exports.DiagnosticInfo_EncodingByte = factories.registerEnumeration(DiagnosticInfo_EncodingByte_Schema);

@@ -44,3 +44,3 @@

var encoding_mask = 0;
let encoding_mask = 0;

@@ -72,3 +72,3 @@ if (diagnosticInfo.symbolicId >=0) {

var set_flag = require("node-opcua-utils").set_flag;
var check_flag = require("node-opcua-utils").check_flag;
const check_flag = require("node-opcua-utils").check_flag;

@@ -81,3 +81,3 @@ // Note:

var DiagnosticInfo_Schema = {
const DiagnosticInfo_Schema = {
name: "DiagnosticInfo",

@@ -97,3 +97,3 @@ fields: [

var encoding_mask = getDiagnosticInfoEncodingByte(diagnosticInfo);
const encoding_mask = getDiagnosticInfoEncodingByte(diagnosticInfo);

@@ -136,8 +136,8 @@ // write encoding byte

var tracer = options.tracer;
const tracer = options.tracer;
tracer.trace("start", options.name + "(" + "DiagnosticInfo" + ")", stream.length, stream.length);
var cursor_before = stream.length;
var encoding_mask = ec.decodeByte(stream);
let cursor_before = stream.length;
const encoding_mask = ec.decodeByte(stream);

@@ -188,3 +188,3 @@ tracer.trace("member", "encodingByte", "0x" + encoding_mask.toString(16), cursor_before, stream.length, "Mask");

if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerDiagnosticInfo)) {
var DiagnosticInfo = require("../_generated_/_auto_generated_DiagnosticInfo").DiagnosticInfo;
const DiagnosticInfo = require("../_generated_/_auto_generated_DiagnosticInfo").DiagnosticInfo;

@@ -203,3 +203,3 @@ diagnosticInfo.innerDiagnosticInfo = new DiagnosticInfo({});

var encoding_mask = ec.decodeByte(stream);
const encoding_mask = ec.decodeByte(stream);

@@ -233,3 +233,3 @@ // read symbolic id

var DiagnosticInfo = require("../_generated_/_auto_generated_DiagnosticInfo").DiagnosticInfo;
const DiagnosticInfo = require("../_generated_/_auto_generated_DiagnosticInfo").DiagnosticInfo;
diagnosticInfo.innerDiagnosticInfo = new DiagnosticInfo({});

@@ -236,0 +236,0 @@ diagnosticInfo.innerDiagnosticInfo.decode(stream, options);

"use strict";
var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");

@@ -11,3 +11,3 @@ // OPCUA 1.03 : Part 3 $ 8.40 page 65

var EnumValueType_Schema = {
const EnumValueType_Schema = {
name: "EnumValueType",

@@ -14,0 +14,0 @@ fields: [

"use strict";
var factories = require("node-opcua-factory");
var ec = require("node-opcua-basic-types");
var assert = require("node-opcua-assert");
const factories = require("node-opcua-factory");
const ec = require("node-opcua-basic-types");
const assert = require("node-opcua-assert").assert;
function getLocalizeText_EncodingByte(localizedText) {
var encoding_mask = 0;
let encoding_mask = 0;
if (localizedText.locale) {

@@ -19,3 +19,3 @@ encoding_mask += 1;

// see Part 3 - $8.5 page 63
var LocalizedText_Schema = {
const LocalizedText_Schema = {
name: "LocalizedText",

@@ -30,3 +30,3 @@ id: factories.next_available_id(),

encode: function (localizedText, stream) {
var encoding_mask = getLocalizeText_EncodingByte(localizedText);
const encoding_mask = getLocalizeText_EncodingByte(localizedText);
ec.encodeByte(encoding_mask, stream);

@@ -42,8 +42,8 @@ if ((encoding_mask & 0x01) === 0x01) {

var cursor_before;
var tracer = options.tracer;
let cursor_before;
const tracer = options.tracer;
tracer.trace("start", options.name + "(" + "LocalizedText" + ")", stream.length, stream.length);
cursor_before = stream.length;
var encoding_mask = ec.decodeByte(stream);
const encoding_mask = ec.decodeByte(stream);
tracer.trace("member", "encodingByte", "0x" + encoding_mask.toString(16), cursor_before, stream.length, "Mask");

@@ -70,3 +70,3 @@ cursor_before = stream.length;

var encoding_mask = ec.decodeByte(stream);
const encoding_mask = ec.decodeByte(stream);
if ((encoding_mask & 0x01) === 0x01) {

@@ -73,0 +73,0 @@ self.locale = ec.decodeString(stream);

"use strict";
var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");
var EnumNodeClass_Schema = {
const EnumNodeClass_Schema = {
name: "NodeClass",

@@ -7,0 +7,0 @@ documentation: "A mask specifying the class of the node.",

"use strict";
var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");
// see Part 3 $8.3 and Part 6 $5.2.213
var QualifiedName_Schema = {
const QualifiedName_Schema = {
name: "QualifiedName",

@@ -8,0 +8,0 @@ id: factories.next_available_id(),

@@ -1,2 +0,2 @@

var BrowseDescriptionResultMask = {
const BrowseDescriptionResultMask = {

@@ -7,5 +7,5 @@ };

var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");
var ResultMask_Schema = {
const ResultMask_Schema = {
name: "ResultMask",

@@ -12,0 +12,0 @@ enumValues: {

@@ -13,4 +13,4 @@ /*

*/
var coerceNodeId = require("node-opcua-nodeid").coerceNodeId;
var TimeZone_Schema = {
const coerceNodeId = require("node-opcua-nodeid").coerceNodeId;
const TimeZone_Schema = {
id: coerceNodeId("ns=0;i=8917"),

@@ -17,0 +17,0 @@ name: "TimeZone",

@@ -7,9 +7,9 @@ "use strict";

var Enum = require("node-opcua-enum");
var assert = require("node-opcua-assert");
const Enum = require("node-opcua-enum");
const assert = require("node-opcua-assert").assert;
var registerBasicType = require("node-opcua-factory").registerBasicType;
var utils = require("node-opcua-utils");
const registerBasicType = require("node-opcua-factory").registerBasicType;
const utils = require("node-opcua-utils");
var AccessLevelFlag = new Enum({
const AccessLevelFlag = new Enum({
CurrentRead: 0x01,//bit 0 : Indicate if the current value is readable (0 means not readable, 1 means readable).

@@ -34,4 +34,4 @@ CurrentWrite: 0x02,//bit 1 : Indicate if the current value is writable (0 means not writable, 1 means writable).

// makeAccessLevel("CurrentRead | CurrentWrite").should.eql(0x03);
var makeAccessLevel = function (str) {
var accessFlag;
const makeAccessLevel = function (str) {
let accessFlag;
if (str === "" || str === 0 ) {

@@ -60,3 +60,3 @@ accessFlag = AccessLevelFlag.get("NONE");

decode: function (stream) {
var code = stream.readUInt8();
const code = stream.readUInt8();
return AccessLevelFlag.get(code ? code : AccessLevelFlag.NONE.value);

@@ -63,0 +63,0 @@ },

"use strict";
var _ = require("underscore");
var assert = require("node-opcua-assert");
const _ = require("underscore");
const assert = require("node-opcua-assert").assert;
var AttributeIds = {
const AttributeIds = {
NodeId: 1,

@@ -8,0 +8,0 @@ NodeClass: 2,

@@ -8,3 +8,3 @@ "use strict";

var valid_encoding = ["DefaultBinary", "DefaultXml"];
const valid_encoding = ["DefaultBinary", "DefaultXml"];

@@ -11,0 +11,0 @@ if (!is_dataEncoding(dataEncoding)) {

@@ -6,3 +6,3 @@ "use strict";

var factory = require("node-opcua-factory");
const factory = require("node-opcua-factory");
factory.registerSpecialVariantEncoder(exports.DiagnosticInfo);

@@ -6,5 +6,5 @@ "use strict";

var assert = require("node-opcua-assert");
const assert = require("node-opcua-assert").assert;
var LocalizedText = require("../_generated_/_auto_generated_LocalizedText").LocalizedText;
const LocalizedText = require("../_generated_/_auto_generated_LocalizedText").LocalizedText;
exports.LocalizedText = LocalizedText;

@@ -29,3 +29,3 @@

var factory = require("node-opcua-factory");
const factory = require("node-opcua-factory");
factory.registerSpecialVariantEncoder(exports.LocalizedText);

@@ -1,2 +0,2 @@

var Enum = require("node-opcua-enum");
const Enum = require("node-opcua-enum");

@@ -11,3 +11,3 @@ // Specifies the NodeClasses of the TargetNodes. Only TargetNodes with the

var NodeClassMask = new Enum({
const NodeClassMask = new Enum({
"Object": (1 << 0),

@@ -26,3 +26,3 @@ "Variable": (1 << 1),

exports.makeNodeClassMask = function (str) {
var classMask = NodeClassMask.get(str);
const classMask = NodeClassMask.get(str);
/* istanbul ignore next */

@@ -29,0 +29,0 @@ if (!classMask) {

@@ -6,7 +6,7 @@ "use strict";

var factories = require("node-opcua-factory");
var assert = require("node-opcua-assert");
var _ = require("underscore");
const factories = require("node-opcua-factory");
const assert = require("node-opcua-assert").assert;
const _ = require("underscore");
var QualifiedName = require("../_generated_/_auto_generated_QualifiedName").QualifiedName;
const QualifiedName = require("../_generated_/_auto_generated_QualifiedName").QualifiedName;
exports.QualifiedName = QualifiedName;

@@ -37,4 +37,4 @@

var split_array = value.split(":");
var namespaceIndex = 0;
const split_array = value.split(":");
let namespaceIndex = 0;
if (!isNaN(parseFloat(split_array[0])) && isFinite(split_array[0]) && Number.isInteger(parseFloat(split_array[0])) && split_array.length > 1) {

@@ -65,3 +65,3 @@ namespaceIndex = parseInt(split_array[0]);

var factory = require("node-opcua-factory");
const factory = require("node-opcua-factory");
factory.registerSpecialVariantEncoder(exports.QualifiedName);
"use strict";
// Specifies the fields in the ReferenceDescription structure that should be
// returned. The fields are assigned the following bits:
var ResultMask = require("../schemas/ResultMask_enum").ResultMask;
const ResultMask = require("../schemas/ResultMask_enum").ResultMask;
exports.ResultMask = ResultMask;

@@ -6,0 +6,0 @@ // The ReferenceDescription type is defined in 7.24.

"use strict";
var Enum = require("node-opcua-enum");
const Enum = require("node-opcua-enum");
var WriteMask = new Enum({
const WriteMask = new Enum({
AccessLevel: (1 << 0),// Indicates if the AccessLevel Attribute is writable.

@@ -7,0 +7,0 @@ ArrayDimensions: (1 << 1),// Indicates if the ArrayDimensions Attribute is writable.

var factories = require("node-opcua-factory");
const factories = require("node-opcua-factory");
var ObjWithAccessLevel_Schema = {
const ObjWithAccessLevel_Schema = {

@@ -7,0 +7,0 @@ id: factories.next_available_id(),

@@ -1,14 +0,14 @@

var should = require("should");
var assert = require("node-opcua-assert");
var _ = require("underscore");
var path = require("path");
const should = require("should");
const assert = require("node-opcua-assert").assert;
const _ = require("underscore");
const path = require("path");
var AccessLevelFlag = require("..").AccessLevelFlag;
var makeAccessLevel = require("..").makeAccessLevel;
var findBuiltInType = require("node-opcua-factory").findBuiltInType;
const AccessLevelFlag = require("..").AccessLevelFlag;
const makeAccessLevel = require("..").makeAccessLevel;
const findBuiltInType = require("node-opcua-factory").findBuiltInType;
var generator = require("node-opcua-generator");
const generator = require("node-opcua-generator");
var tmpfolder = path.join(__dirname,"../_test_generated");
var ObjWithAccessLevel = generator.registerObject(path.join(__dirname,"fixture_schemas")+"|ObjWithAccessLevel", tmpfolder);
const tmpfolder = path.join(__dirname,"../_test_generated");
const ObjWithAccessLevel = generator.registerObject(path.join(__dirname,"fixture_schemas")+"|ObjWithAccessLevel", tmpfolder);

@@ -35,3 +35,3 @@ assert(_.isFunction(ObjWithAccessLevel));

it("should create a flag with no bit set", function () {
var accessLevel = makeAccessLevel("");
const accessLevel = makeAccessLevel("");
accessLevel.key.should.eql("NONE");

@@ -44,3 +44,3 @@ accessLevel.value.should.equal(AccessLevelFlag.NONE.value);

it("should create a flag with no bit set -> 0", function () {
var accessLevel = makeAccessLevel(0);
const accessLevel = makeAccessLevel(0);
accessLevel.key.should.eql("NONE");

@@ -57,3 +57,3 @@ accessLevel.value.should.equal(AccessLevelFlag.NONE.value);

it("should create an object with access_level", function () {
var o = new ObjWithAccessLevel();
const o = new ObjWithAccessLevel();
o.should.have.property("accessLevel");

@@ -65,3 +65,3 @@ o.accessLevel.should.eql(AccessLevelFlag.get("CurrentRead | CurrentWrite"));

var o = new ObjWithAccessLevel({
const o = new ObjWithAccessLevel({
accessLevel: "HistoryWrite | SemanticChange"

@@ -76,3 +76,3 @@ });

var o = new ObjWithAccessLevel({
const o = new ObjWithAccessLevel({
accessLevel: 0x5

@@ -86,6 +86,6 @@ });

var o = new ObjWithAccessLevel({});
const o = new ObjWithAccessLevel({});
o.accessLevel.should.eql(AccessLevelFlag.get("CurrentRead | CurrentWrite"));
var encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test
const encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test;
encode_decode_round_trip_test(o);

@@ -98,3 +98,3 @@

var accessLevel = makeAccessLevel("CurrentWrite | CurrentRead");
const accessLevel = makeAccessLevel("CurrentWrite | CurrentRead");

@@ -101,0 +101,0 @@ accessLevel.has("CurrentWrite").should.be.eql(true);

var should = require("should");
const should = require("should");
var encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test
const encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test;
var DiagnosticInfo = require("..").DiagnosticInfo;
const DiagnosticInfo = require("..").DiagnosticInfo;
var StatusCodes = require("node-opcua-status-code").StatusCodes;
const StatusCodes = require("node-opcua-status-code").StatusCodes;

@@ -22,3 +22,3 @@ describe("DiagnosticInfo", function () {

var diag = new DiagnosticInfo();
const diag = new DiagnosticInfo();

@@ -40,3 +40,3 @@

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
symbolicId: 120

@@ -53,3 +53,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
symbolicId: 120,

@@ -67,3 +67,3 @@ locale: 128

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
symbolicId: 120,

@@ -82,3 +82,3 @@ locale: 128,

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
innerDiagnosticInfo: new DiagnosticInfo({})

@@ -94,3 +94,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
innerDiagnosticInfo: new DiagnosticInfo({additionalInfo: "Hello"})

@@ -106,3 +106,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
symbolicId: 1234

@@ -119,3 +119,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
localizedText: 1234

@@ -131,3 +131,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
namespaceUri: 1234

@@ -143,3 +143,3 @@ });

var diag = new DiagnosticInfo({
const diag = new DiagnosticInfo({
localizedText: 2345,

@@ -146,0 +146,0 @@ symbolicId: 3456,

"use strict";
var should = require("should");
var util = require("util");
var BinaryStream = require("node-opcua-binary-stream").BinaryStream;
var LocalizedText = require("..").LocalizedText;
const should = require("should");
const util = require("util");
const BinaryStream = require("node-opcua-binary-stream").BinaryStream;
const LocalizedText = require("..").LocalizedText;

@@ -12,3 +12,3 @@ describe("LocalizedText", function () {

var ltext = new LocalizedText({text: "HelloWorld", locale: "en-US"});
const ltext = new LocalizedText({text: "HelloWorld", locale: "en-US"});
ltext.should.have.property("text");

@@ -23,5 +23,5 @@ ltext.should.have.property("locale");

var ltext = new LocalizedText({text: "HelloWorld", locale: "en-US"});
const ltext = new LocalizedText({text: "HelloWorld", locale: "en-US"});
var stream = new BinaryStream();
const stream = new BinaryStream();
stream.length.should.equal(0);

@@ -33,3 +33,3 @@

var ltext_verif = new LocalizedText();
const ltext_verif = new LocalizedText();

@@ -48,3 +48,3 @@ stream.rewind();

var ltext = new LocalizedText({text: "HelloWorld", locale: null});
const ltext = new LocalizedText({text: "HelloWorld", locale: null});

@@ -54,3 +54,3 @@ ltext.should.have.property("locale");

var stream = new BinaryStream();
const stream = new BinaryStream();
stream.length.should.equal(0);

@@ -62,3 +62,3 @@

var ltext_verif = new LocalizedText();
const ltext_verif = new LocalizedText();

@@ -75,3 +75,3 @@ stream.rewind();

var ltext = new LocalizedText({text: null, locale: "en-US"});
const ltext = new LocalizedText({text: null, locale: "en-US"});

@@ -81,3 +81,3 @@ ltext.should.have.property("text");

var stream = new BinaryStream();
const stream = new BinaryStream();
stream.length.should.equal(0);

@@ -89,3 +89,3 @@

var ltext_verif = new LocalizedText();
const ltext_verif = new LocalizedText();

@@ -102,3 +102,3 @@ stream.rewind();

var coerceLocalizedText = require("..").coerceLocalizedText;
const coerceLocalizedText = require("..").coerceLocalizedText;
it("#coerceLocalizedText - null", function () {

@@ -105,0 +105,0 @@

"use strict";
require("should");
var makeNodeClassMask = require("..").makeNodeClassMask;
const makeNodeClassMask = require("..").makeNodeClassMask;

@@ -10,3 +10,3 @@ describe("testing makeNodeClassMask", function () {

var mask = makeNodeClassMask("Object | ObjectType");
const mask = makeNodeClassMask("Object | ObjectType");
mask.should.eql(1 + (1 << 3));

@@ -13,0 +13,0 @@

/*global require,describe,it*/
var should = require('should');
const should = require('should');
var QualifiedName = require('..').QualifiedName;
var stringToQualifiedName = require('..').stringToQualifiedName;
const QualifiedName = require('..').QualifiedName;
const stringToQualifiedName = require('..').stringToQualifiedName;

@@ -11,37 +11,37 @@ describe('test qualified name pull request #406', function () {

it('should convert a string "Hello" into a qualified name ', function () {
var qn = stringToQualifiedName('Hello');
const qn = stringToQualifiedName('Hello');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: 'Hello'}));
});
it('should convert a string "1" into a qualified name ', function () {
var qn = stringToQualifiedName('1');
const qn = stringToQualifiedName('1');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: '1'}));
});
it('should convert a string "1:Hello" name into a qualified name ', function () {
var qn = stringToQualifiedName('1:Hello');
const qn = stringToQualifiedName('1:Hello');
qn.should.eql(new QualifiedName({namespaceIndex: 1, name: 'Hello'}));
});
it('should convert a string "Hel:lo" into a qualified name ', function () {
var qn = stringToQualifiedName('Hel:lo');
const qn = stringToQualifiedName('Hel:lo');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: 'Hel:lo'}));
});
it('should convert a string "He:ll:o" name into a qualified name ', function () {
var qn = stringToQualifiedName('He:ll:o');
const qn = stringToQualifiedName('He:ll:o');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: 'He:ll:o'}));
});
it('should convert a string "1:He:ll:o" name into a qualified name ', function () {
var qn = stringToQualifiedName('1:He:ll:o');
const qn = stringToQualifiedName('1:He:ll:o');
qn.should.eql(new QualifiedName({namespaceIndex: 1, name: 'He:ll:o'}));
});
it('should convert a string "1.5:Hello" name into a qualified name ', function () {
var qn = stringToQualifiedName('1.5:Hello');
const qn = stringToQualifiedName('1.5:Hello');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: '1.5:Hello'}));
});
it('should convert a string "1.5:Hel:lo" name into a qualified name ', function () {
var qn = stringToQualifiedName('1.5:Hel:lo');
const qn = stringToQualifiedName('1.5:Hel:lo');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: '1.5:Hel:lo'}));
});
it('should convert a string "1.5:He:ll:o" name into a qualified name ', function () {
var qn = stringToQualifiedName('1.5:He:ll:o');
const qn = stringToQualifiedName('1.5:He:ll:o');
qn.should.eql(new QualifiedName({namespaceIndex: 0, name: '1.5:He:ll:o'}));
});
});
/*global require,describe,it*/
var should = require("should");
const should = require("should");
var QualifiedName = require("..").QualifiedName;
var coerceQualifiedName = require("..").coerceQualifyName;
const QualifiedName = require("..").QualifiedName;
const coerceQualifiedName = require("..").coerceQualifyName;

@@ -12,3 +12,3 @@ describe("QualifiedName", function () {

it("should construct a qualified name", function () {
var qn = new QualifiedName({});
const qn = new QualifiedName({});
qn.namespaceIndex.should.eql(0);

@@ -18,25 +18,25 @@ should(qn.name === null).be.equal(true);

it("testing qualified name toString", function () {
var qn = new QualifiedName({name: "Hello"});
const qn = new QualifiedName({name: "Hello"});
qn.toString().should.eql("Hello");
});
it("testing qualified name toString", function () {
var qn = new QualifiedName({namespaceIndex: 2, name: "Hello"});
const qn = new QualifiedName({namespaceIndex: 2, name: "Hello"});
qn.toString().should.eql("2:Hello");
});
it("should coerce a string into a qualified name ", function () {
var qn = coerceQualifiedName("Hello");
const qn = coerceQualifiedName("Hello");
qn.toString().should.eql("Hello");
});
it("should coerce a qualified name into a qualified name ", function () {
var qn = coerceQualifiedName({namespaceIndex: 0, name: "Hello"});
const qn = coerceQualifiedName({namespaceIndex: 0, name: "Hello"});
qn.toString().should.eql("Hello");
});
it("should coerce a null object into a null qualified name ", function () {
var qn = coerceQualifiedName();
const qn = coerceQualifiedName();
should(qn).eql(null);
});
it("QualifiedName#isEmpty",function() {
var qn = new QualifiedName({});
const qn = new QualifiedName({});
qn.isEmpty().should.eql(true);
});
});
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