fix: no static classes
This commit is contained in:
parent
243adea3e6
commit
09c8007c09
|
@ -1,19 +1,19 @@
|
||||||
import Actions from '../actions';
|
import Actions from '../actions';
|
||||||
|
|
||||||
export default class Flow {
|
export default {
|
||||||
|
|
||||||
static conditional(condition, expressions, context) {
|
conditional: (condition, expressions, context) => {
|
||||||
if (condition.get(context)) {
|
if (condition.get(context)) {
|
||||||
return (new Actions(expressions)).serial(context);
|
return (new Actions(expressions)).serial(context);
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
|
||||||
static parallel(expressions, context) {
|
parallel: (expressions, context) => {
|
||||||
return (new Actions(expressions)).parallel(context);
|
return (new Actions(expressions)).parallel(context);
|
||||||
}
|
},
|
||||||
|
|
||||||
static serial(expressions, context) {
|
serial: (expressions, context) => {
|
||||||
return (new Actions(expressions)).serial(context);
|
return (new Actions(expressions)).serial(context);
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import {TickingPromise} from '@avocado/core';
|
import {TickingPromise} from '@avocado/core';
|
||||||
|
|
||||||
export default class Timing {
|
export default {
|
||||||
|
|
||||||
static wait (duration) {
|
wait: (duration) => {
|
||||||
return new TickingPromise(
|
return new TickingPromise(
|
||||||
() => {},
|
() => {},
|
||||||
(elapsed, resolve) => {
|
(elapsed, resolve) => {
|
||||||
|
@ -12,6 +12,6 @@ export default class Timing {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {merge as mergeObject} from '@avocado/core';
|
import {merge as mergeObject} from '@avocado/core';
|
||||||
|
|
||||||
export default class Utility {
|
export default {
|
||||||
|
|
||||||
static makeArray(...args) {
|
makeArray: (...args) => {
|
||||||
// No context!
|
// No context!
|
||||||
args.pop();
|
args.pop();
|
||||||
return args;
|
return args;
|
||||||
};
|
},
|
||||||
|
|
||||||
static makeObject(...args) {
|
makeObject: (...args) => {
|
||||||
// No context!
|
// No context!
|
||||||
args.pop();
|
args.pop();
|
||||||
const object = {};
|
const object = {};
|
||||||
|
@ -18,16 +18,16 @@ export default class Utility {
|
||||||
object[key] = value;
|
object[key] = value;
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
};
|
},
|
||||||
|
|
||||||
static log(...args) {
|
log: (...args) => {
|
||||||
return console.log(...args);
|
return console.log(...args);
|
||||||
}
|
},
|
||||||
|
|
||||||
static merge(...args) {
|
merge: (...args) => {
|
||||||
// No context!
|
// No context!
|
||||||
args.pop();
|
args.pop();
|
||||||
return mergeObject(...args);
|
return mergeObject(...args);
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user