'use strict'; /** * Checks whether node is of specific bpmn type. * * @param {ModdleElement} node * @param {String} type * * @return {Boolean} */ function is(node, type) { if (type.indexOf(':') === -1) { type = 'bpmn:' + type; } return ( (typeof node.$instanceOf === 'function') ? node.$instanceOf(type) : node.$type === type ); } /** * Checks whether node has any of the specified types. * * @param {ModdleElement} node * @param {Array} types * * @return {Boolean} */ function isAny(node, types) { return types.some(function(type) { return is(node, type); }); } exports.is = is; exports.isAny = isAny; //# sourceMappingURL=index.cjs.map