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;
|
}
|