@woosh/meep-engine 2.48.5 → 2.48.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -319,6 +319,30 @@ export class NodeDescription {
|
|
|
319
319
|
return result;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @param {string} name
|
|
325
|
+
* @param {PortDirection} direction
|
|
326
|
+
* @return {Port|undefined}
|
|
327
|
+
*/
|
|
328
|
+
findPortByNameAndDirection(name, direction) {
|
|
329
|
+
assert.isString(name, 'name');
|
|
330
|
+
assert.enum(direction, PortDirection, 'direction');
|
|
331
|
+
|
|
332
|
+
const ports = this.ports;
|
|
333
|
+
const port_count = ports.length;
|
|
334
|
+
|
|
335
|
+
for (let i = 0; i < port_count; i++) {
|
|
336
|
+
const port = ports[i];
|
|
337
|
+
|
|
338
|
+
if (port.name === name && port.direction === direction) {
|
|
339
|
+
return port;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return undefined;
|
|
344
|
+
}
|
|
345
|
+
|
|
322
346
|
/**
|
|
323
347
|
*
|
|
324
348
|
* @returns {Port[]}
|