Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function _adjust_options(self, options) {
const ns = self.addressSpace.getNamespaceIndex(self.namespaceUri);
if (!options.nodeId) {
const id = self._getNextAvailableId();
options.nodeId = new NodeId(NodeId.NodeIdType.NUMERIC, id, ns);
}
options.nodeId = NodeId.coerce(options.nodeId);
if (typeof options.browseName === "string") {
options.browseName = new QualifiedName({
name: options.browseName,
namespaceIndex: ns
});
}
return options;
}