This commit is contained in:
Leifer Mendez
2022-11-19 21:17:18 +01:00
parent 0c850d47d7
commit c40c0c54bd
2 changed files with 0 additions and 13 deletions

View File

@@ -1,17 +1,12 @@
const { toSerialize } = require('./methods')
class FlowClass {
allContexts = []
allCallbacks = []
flowSerialize = []
flowRaw = []
constructor(_flow) {
if (!Array.isArray(_flow)) throw new Error('Esto debe ser un ARRAY')
this.flowRaw = _flow
this.allContexts = _flow
.map((ctxs) => ctxs.ctx.contexts)
.flat(2)
.map((c, i) => ({ getCtx: c?.getCtx, index: i }))
this.allCallbacks = _flow
.map((cbIn) => cbIn.ctx.callbacks)