src/index.js
/**
     * @summary Registers `callback` to run when this computation is stopped, or runs it immediately if the computation is already stopped.  The callback is run after any `onInvalidate` callbacks.
     * @locus Client
     * @param {Function} callback Function to be called on stop. Receives one argument, the computation that was stopped.
     */
@summary Registers `callback` to run when this computation is stopped, or runs it immediately if the computation is already stopped.  The callback is run after any `onInvalidate` callbacks.
@locus Client
@param {Function} callback Function to be called on stop. Receives one argument, the computation that was stopped.
@summary Registers ` callback ` to run when this computation is stopped or runs it immediately if the computation is already stopped . The callback is run after any ` onInvalidate ` callbacks . @locus Client @param { Function } callback Function to be called on stop . Receives one argument the computation that was stopped .
onStop(f) {
      let self = this;
      if (typeof f !== 'function')
        throw new Error("onStop requires a function");
      if (self.stopped) {
        Tracker.nonreactive(function () {
          withNoYieldsAllowed(f)(self);
        });
      } else {
        self._onStopCallbacks.push(f);
      }
    }
onStop ( f ) { let self = this ; if ( typeof f !== 'function' ) throw new Error ( "onStop requires a function" ) ; if ( self . stopped ) { Tracker . nonreactive ( function ( ) { withNoYieldsAllowed ( f ) ( self ) ; } ) ; } else { self . _onStopCallbacks . push ( f ) ; } }
@summary Registers `callback` to run when this computation is stopped, or runs it immediately if the computation is already stopped.
@summary Registers ` callback ` to run when this computation is stopped or runs it immediately if the computation is already stopped .