UNPKG

webgme-dss

Version:

Design Studio for Dynamic Systems with Modelica as backend

18 lines (16 loc) 515 B
/** * Returns the meta-node that matches the given name. * Return undefined in match * @param {object} gmeClient * @param {string} name * @returns {GMENode|undefined} The first meta-node that matches the name. */ export default function (gmeClient, name) { const metaNodes = gmeClient.getAllMetaNodes(); for (let i = 0; i < metaNodes.length; i += 1) { if (metaNodes[i].getAttribute('name') === name) { return metaNodes[i]; } } return undefined; }