src/index.js
/**
   * Generate a random email from domains and prefix
   */
Generate a random email from domains and prefix
Generate a random email from domains and prefix
async _useOrCreateEmail(addressPrefix) {
    if (addressPrefix.includes("@")) { return addressPrefix; }
    try {
      const domains = await this.domains();
      return `${addressPrefix}@${chance.pickone(domains)}`;
    } catch(error) {
      console.error(error);
    }
    return false;
  }
async _useOrCreateEmail ( addressPrefix ) { if ( addressPrefix . includes ( "@" ) ) { return addressPrefix ; } try { const domains = await this . domains ( ) ; return ` ${ addressPrefix } ${ chance . pickone ( domains ) } ` ; } catch ( error ) { console . error ( error ) ; } return false ; }
Generate a random email from domains and prefix
Generate a random email from domains and prefix