• The sameNodeId function is used to compare two NodeId objects to determine if they are identical. This comparison is based on the identifier type, namespace, and value of the NodeId objects.

    Parameters

    Returns boolean

    Returns true if the two NodeId objects are identical, otherwise returns false.

    const nodeId1: NodeId = new NodeId(NodeIdType.STRING, "example", 1);
    const nodeId2: NodeId = coerceNodeId("ns=1;s=example");
    const areSame = sameNodeId(nodeId1, nodeId2); // returns true