MCPcopy
hub / github.com/pstadler/flightplan / _setupFlight

Function _setupFlight

lib/index.js:13–26  ·  view source on GitHub ↗
(type, tasksOrFn, fn)

Source from the content-addressed store, hash-verified

11var DEFAULT_TASK = 'default';
12
13function _setupFlight(type, tasksOrFn, fn) {
14 var tasks;
15
16 if(typeof tasksOrFn === 'string') {
17 tasks = [tasksOrFn];
18 } else if(Array.isArray(tasksOrFn)) {
19 tasks = tasksOrFn;
20 } else {
21 tasks = [DEFAULT_TASK];
22 fn = tasksOrFn;
23 }
24
25 return { type: type, tasks: tasks, fn: fn };
26}
27
28/**
29 * A flightplan is a set of subsequent flights to be executed on one or more

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected