resolveNodeId can be helpful to convert a wellknown Node Name to a nodeid if a wellknown node name cannot be detected, the function falls back to calling coerceNodeId coerceNodeId.
Optional
const nodeId = resolveNodeId("ObjectsFolder");console.log(nodeId.toString()); Copy
const nodeId = resolveNodeId("ObjectsFolder");console.log(nodeId.toString());
>ns=0;i=85 Copy
>ns=0;i=85
const nodeId = resolveNodeId("HasComponent");console.log(nodeId.toString()); Copy
const nodeId = resolveNodeId("HasComponent");console.log(nodeId.toString());
>ns=0;i=33 Copy
>ns=0;i=33
const nodeId = resolveNodeId("ns=1;i=4444");console.log(nodeId.toString()); Copy
const nodeId = resolveNodeId("ns=1;i=4444");console.log(nodeId.toString());
>ns=1;i=4444 Copy
>ns=1;i=4444
resolveNodeId can be helpful to convert a wellknown Node Name to a nodeid if a wellknown node name cannot be detected, the function falls back to calling coerceNodeId coerceNodeId.