diff --git a/packages/behavior/types/flow.js b/packages/behavior/types/flow.js index 9e4d1b6..3d75a74 100644 --- a/packages/behavior/types/flow.js +++ b/packages/behavior/types/flow.js @@ -1,19 +1,19 @@ import Actions from '../actions'; -export default class Flow { +export default { - static conditional(condition, expressions, context) { + conditional: (condition, expressions, context) => { if (condition.get(context)) { return (new Actions(expressions)).serial(context); } - }; + }, - static parallel(expressions, context) { + parallel: (expressions, context) => { return (new Actions(expressions)).parallel(context); - } + }, - static serial(expressions, context) { + serial: (expressions, context) => { return (new Actions(expressions)).serial(context); - } + }, } diff --git a/packages/behavior/types/timing.js b/packages/behavior/types/timing.js index 1fdc368..3b3dd93 100644 --- a/packages/behavior/types/timing.js +++ b/packages/behavior/types/timing.js @@ -1,8 +1,8 @@ import {TickingPromise} from '@avocado/core'; -export default class Timing { +export default { - static wait (duration) { + wait: (duration) => { return new TickingPromise( () => {}, (elapsed, resolve) => { @@ -12,6 +12,6 @@ export default class Timing { } }, ); - } + }, } diff --git a/packages/behavior/types/utility.js b/packages/behavior/types/utility.js index de8c4d9..79f6741 100644 --- a/packages/behavior/types/utility.js +++ b/packages/behavior/types/utility.js @@ -1,14 +1,14 @@ import {merge as mergeObject} from '@avocado/core'; -export default class Utility { +export default { - static makeArray(...args) { + makeArray: (...args) => { // No context! args.pop(); return args; - }; + }, - static makeObject(...args) { + makeObject: (...args) => { // No context! args.pop(); const object = {}; @@ -18,16 +18,16 @@ export default class Utility { object[key] = value; } return object; - }; + }, - static log(...args) { + log: (...args) => { return console.log(...args); - } + }, - static merge(...args) { + merge: (...args) => { // No context! args.pop(); return mergeObject(...args); - } + }, }