lib/SlaveArray.js
/**
   * Allows us to chain promises against the instantation of a Slave objects.
   * @param {Function} cb The callback to invoke.
   * @return {Promise} A promise for completion.
   */
Allows us to chain promises against the instantation of a Slave objects.
@param {Function} cb The callback to invoke.
@return {Promise} A promise for completion.
Allows us to chain promises against the instantation of a Slave objects . @param { Function } cb The callback to invoke . @return { Promise } A promise for completion .
then(cb) {
    if (cb instanceof Function) {
      const res = cb.call(this, this);
      if (res instanceof Promise) return res;
      return new Promise(resolve => {
        resolve(res);
      });
    }
    return new Promise(resolve => {
      resolve();
    });
  }
then ( cb ) { if ( cb instanceof Function ) { const res = cb . call ( this , this ) ; if ( res instanceof Promise ) return res ; return new Promise ( resolve => { resolve ( res ) ; } ) ; } return new Promise ( resolve => { resolve ( ) ; } ) ; }
Allows us to chain promises against the instantation of a Slave objects.
Allows us to chain promises against the instantation of a Slave objects .