flw.js
function _make(fn) {
      // the user calls this function, e.g. flw.make.series(...)
      return function madeFunction(fns, context, returnKey) {
        if (typeof context === 'string') {
          returnKey = context; context = {};
        }
        // this function is consumed by flw
        return function flowFunction(context, cb) {
          // when passed from a flw flow it's called with a premade context
          // if called directly, create a new context
          if (cb === undefined && typeof context === 'function') {
            cb = context;
            context = {};
            _checkContext(context);
          }

          if (typeof cb !== 'function') {
            throw new Error('flw: .make - cb !== function');
          }
          return fn(fns, context, returnKey, cb);
        };
      };
    }
function _make(fn) {
      // the user calls this function, e.g. flw.make.series(...)
      return function madeFunction(fns, context, returnKey) {
        if (typeof context === 'string') {
          returnKey = context; context = {};
        }
        // this function is consumed by flw
        return function flowFunction(context, cb) {
          // when passed from a flw flow it's called with a premade context
          // if called directly, create a new context
          if (cb === undefined && typeof context === 'function') {
            cb = context;
            context = {};
            _checkContext(context);
          }

          if (typeof cb !== 'function') {
            throw new Error('flw: .make - cb !== function');
          }
          return fn(fns, context, returnKey, cb);
        };
      };
    }
function _make ( fn ) { // the user calls this function, e.g. flw.make.series(...) return function madeFunction ( fns , context , returnKey ) { if ( typeof context === 'string' ) { returnKey = context ; context = { } ; } // this function is consumed by flw return function flowFunction ( context , cb ) { // when passed from a flw flow it's called with a premade context // if called directly, create a new context if ( cb === undefined && typeof context === 'function' ) { cb = context ; context = { } ; _checkContext ( context ) ; } if ( typeof cb !== 'function' ) { throw new Error ( 'flw: .make - cb !== function' ) ; } return fn ( fns , context , returnKey , cb ) ; } ; } ; }
takes a function and wraps it so that execution is 'postponed'
takes a function and wraps it so that execution is postponed