src/appstate.js
function createNextFunction (action, resolver) {
  return function next (...args) {
    var path = typeof args[0] === 'string' ? args[0] : null;
    var arg = path ? args[1] : args[0];

    var result = {
      path: path ? path : action.defaultOutput,
      args: arg
    };

    if (resolver) {
      resolver(result);
    } else {
      next._result = result;
    }
  };
}
function createNextFunction (action, resolver) {
  return function next (...args) {
    var path = typeof args[0] === 'string' ? args[0] : null;
    var arg = path ? args[1] : args[0];

    var result = {
      path: path ? path : action.defaultOutput,
      args: arg
    };

    if (resolver) {
      resolver(result);
    } else {
      next._result = result;
    }
  };
}
function createNextFunction ( action , resolver ) { return function next ( ... args ) { var path = typeof args [ 0 ] === 'string' ? args [ 0 ] : null ; var arg = path ? args [ 1 ] : args [ 0 ] ; var result = { path : path ? path : action . defaultOutput , args : arg } ; if ( resolver ) { resolver ( result ) ; } else { next . _result = result ; } } ; }
Create next function in signal chain.
It's unified method for async and sync actions.
@param {Function} action
@param {Function} [resolver]
@returns {Function}
Create next function in signal chain . It s unified method for async and sync actions .