fix: no static classes

This commit is contained in:
cha0s 2020-06-23 19:53:27 -05:00
parent 243adea3e6
commit 09c8007c09
3 changed files with 19 additions and 19 deletions

View File

@ -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);
}
},
}

View File

@ -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 {
}
},
);
}
},
}

View File

@ -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);
}
},
}