lib/flyd.js
/**
 * @private
 * Update a dependent stream using its dependencies in an atomic way
 * @param {stream} stream - the stream to update
 */
@private
Update a dependent stream using its dependencies in an atomic way
@param {stream} stream - the stream to update
@private Update a dependent stream using its dependencies in an atomic way @param { stream } stream - the stream to update
function updateStream(s) {
  if ((s.depsMet !== true && initialDepsNotMet(s)) || (s.end !== undefined && s.end.val === true)) return;
  if (inStream !== undefined) {
    toUpdate.push(s);
    return;
  }
  inStream = s;
  if (s.depsChanged) s.fnArgs[s.fnArgs.length - 1] = s.depsChanged;
  var returnVal = s.fn.apply(s.fn, s.fnArgs);
  if (returnVal !== undefined) {
    s(returnVal);
  }
  inStream = undefined;
  if (s.depsChanged !== undefined) s.depsChanged = [];
  s.shouldUpdate = false;
  if (flushing === false) flushUpdate();
}
function updateStream ( s ) { if ( ( s . depsMet !== true && initialDepsNotMet ( s ) ) || ( s . end !== undefined && s . end . val === true ) ) return ; if ( inStream !== undefined ) { toUpdate . push ( s ) ; return ; } inStream = s ; if ( s . depsChanged ) s . fnArgs [ s . fnArgs . length - 1 ] = s . depsChanged ; var returnVal = s . fn . apply ( s . fn , s . fnArgs ) ; if ( returnVal !== undefined ) { s ( returnVal ) ; } inStream = undefined ; if ( s . depsChanged !== undefined ) s . depsChanged = [ ] ; s . shouldUpdate = false ; if ( flushing === false ) flushUpdate ( ) ; }
@private
 Update a dependent stream using its dependencies in an atomic way
 @param {stream} stream - the stream to update
@private Update a dependent stream using its dependencies in an atomic way @param { stream } stream - the stream to update