function recursive(keyIndex, prevConfig) {
    const key = keys[keyIndex];
    const values = options[key];
    const type = typeof values[0];

    for (const value of values) {
      if (typeof value !== 'number' && typeof value !== 'string') {
        throw new TypeError(`configuration "${key}" had type ${typeof value}`);
      }
      if (typeof value !== type) {
        // This is a requirement for being able to consistently and predictably
        // parse CLI provided configuration values.
        throw new TypeError(`configuration "${key}" has mixed types`);
      }

      const currConfig = Object.assign({ [key]: value }, prevConfig);

      if (keyIndex + 1 < keys.length) {
        recursive(keyIndex + 1, currConfig);
      } else {
        queue.push(currConfig);
      }
    }
  }
// configuration list that contains all combinations.
configuration list that contains all combinations.
configuration list that contains all combinations .
function recursive(keyIndex, prevConfig) {
    const key = keys[keyIndex];
    const values = options[key];
    const type = typeof values[0];
    for (const value of values) {
      if (typeof value !== 'number' && typeof value !== 'string') {
        throw new TypeError(`configuration "${key}" had type ${typeof value}`);
      }
      if (typeof value !== type) {
        throw new TypeError(`configuration "${key}" has mixed types`);
      }
      const currConfig = Object.assign({ [key]: value }, prevConfig);
      if (keyIndex + 1 < keys.length) {
        recursive(keyIndex + 1, currConfig);
      } else {
        queue.push(currConfig);
      }
    }
  }
function recursive ( keyIndex , prevConfig ) { const key = keys [ keyIndex ] ; const values = options [ key ] ; const type = typeof values [ 0 ] ; for ( const value of values ) { if ( typeof value !== 'number' && typeof value !== 'string' ) { throw new TypeError ( ` ${ key } ${ typeof value } ` ) ; } if ( typeof value !== type ) { throw new TypeError ( ` ${ key } ` ) ; } const currConfig = Object . assign ( { [ key ] : value } , prevConfig ) ; if ( keyIndex + 1 < keys . length ) { recursive ( keyIndex + 1 , currConfig ) ; } else { queue . push ( currConfig ) ; } } }
configuration list that contains all combinations.
configuration list that contains all combinations .
// This is a requirement for being able to consistently and predictably // parse CLI provided configuration values.