mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-14 19:25:06 +08:00
chore(project): es6ify source code
* use ES6 import / export * UTILS: export individual utilities * TESTS: localize TestHelper includes BREAKING CHANGE: * all utilities export independent functions * library sources got ported to ES6. You must now use a ES module bundler such as Browserify + babelify or Webpack to consume this library (or parts of it).
This commit is contained in:
@ -8,14 +8,12 @@
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function is(element, type) {
|
||||
export function is(element, type) {
|
||||
var bo = getBusinessObject(element);
|
||||
|
||||
return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
|
||||
}
|
||||
|
||||
module.exports.is = is;
|
||||
|
||||
|
||||
/**
|
||||
* Return the business object for a given element.
|
||||
@ -24,8 +22,6 @@ module.exports.is = is;
|
||||
*
|
||||
* @return {ModdleElement}
|
||||
*/
|
||||
function getBusinessObject(element) {
|
||||
export function getBusinessObject(element) {
|
||||
return (element && element.businessObject) || element;
|
||||
}
|
||||
|
||||
module.exports.getBusinessObject = getBusinessObject;
|
||||
}
|
Reference in New Issue
Block a user