UNPKG

relu-bpmn

Version:

RELU快速开发平台bpmn组件

17 lines (16 loc) 485 B
import { some } from 'min-dash'; export function is(element, type) { var bo = getBusinessObject(element); return bo && typeof bo.$instanceOf === 'function' && bo.$instanceOf(type); } export function isAny(element, types) { return some(types, function (t) { return is(element, t); }); } export function getBusinessObject(element) { return (element && element.businessObject) || element; } export function getDi(element) { return element && element.di; }