Thanks to visit codestin.com
Credit goes to github.com

Skip to content

core events

James edited this page Apr 6, 2017 · 2 revisions

📚 docs

💮 workflow

constructor

/**
 * @event core.create
 * @param {Core} core
 * @param {object} coreConfig
 *
 * on, evt, once
 */

reset

/**
 * @see fliplog.reset
 * @see this.core.reset
 * @see this.evt.reset
 */

contextNames

/**
 * @see this.contexts
 * @return {Array<String>}
 */

filterContexts(names)

/**
 * filter the contexts
 * @see this.contextType
 * @param {Array<string>} names
 * @return {Workflow}
 */

setContexts(contexts)

/**
 * @param {Array<Context>} contexts
 * @return {Workflow}
 */

setCurrentContext(name)

/**
 * @param {string} name
 * @return {Workflow}
 */

mapContexts(cb)

/**
 * @param {Function} cb
 * @return {Array<any>}
 */

emitForContexts(eventName)

/**
 * @event context.*.any
 * @param {string} eventName
 * @return {Workflow}
 */

coreCreate()

/**
 * @event core.create
 * @return {Workflow}
 */

coreInit()

/**
 * @event core.init
 * @return {Workflow}
 */

👂 Event (available on workflow as .evt & .evts)

constructor

/**
 * @param {Workflow} parent
 * add shorthand methods to allow chaining
 */

on(name = true, cb = null) {}

/**
 * if they pass a string into `on` or `once`
 * instead of `name`, use that instead
 *
 * @see this.once
 * @param {string} [name]
 * @param {Function} [cb]
 * @return {EventChain}
 */

once(name = true, cb = null) {}

/**
 * if they pass a string into `on` or `once`
 * instead of `name`, use that instead
 *
 * @see this.on
 * @param {string} [name]
 * @param {Function} [cb]
 * @return {EventChain}
 */

reset() {}

/**
 * @return {EventChain}
 */

getName() {}

/**
 * take our chained settings
 * make it into a namespaced string event
 *
 *
 * @see this.workflow, this.context, this.core, this.name
 * @return {string | Object}
 */

emit(data) {}

/**
 * @see this.getName
 * @param {mixed} [data]
 * @return {EventChain}
 */

cb(cb) {}

/**
 * final piece in a chain
 * @see this.getName
 * @param {Function} cb
 * @return {EventChain}
 */

Clone this wiki locally