function _sanitizeOptions( list ) {
    var item;
    var cleaned = [];

    for ( var i = 0, len = list.length; i < len; i++ ) {
      item = list[i];

      // If the value isn't valid kill the script and prompt the developer.
      if ( !strings.stringValid( item.value ) ) {
        // TODO: Update to throw an error and handle the error vs logging.
        console.log( '\'' + item.value + '\' is not a valid value' );
        // TODO: Remove this line if the class is added via markup.
        element.classList.remove( BASE_CLASS );

        return false;
      }

      cleaned.push( {
        value:   item.value,
        text:    item.text,
        checked: item.defaultSelected
      } );
    }

    return cleaned;
  }
/**
   * Cleans up a list of options for saving to memory.
   * @param   {Array} list The options from the parent select elem.
   * @returns {Array}      An array of option objects.
   */
Cleans up a list of options for saving to memory.
@param   {Array} list The options from the parent select elem.
@returns {Array}      An array of option objects.
Cleans up a list of options for saving to memory . @param { Array } list The options from the parent select elem . @returns { Array } An array of option objects .
function _sanitizeOptions( list ) {
    var item;
    var cleaned = [];
    for ( var i = 0, len = list.length; i < len; i++ ) {
      item = list[i];
      if ( !strings.stringValid( item.value ) ) {
        console.log( '\'' + item.value + '\' is not a valid value' );
        element.classList.remove( BASE_CLASS );
        return false;
      }
      cleaned.push( {
        value:   item.value,
        text:    item.text,
        checked: item.defaultSelected
      } );
    }
    return cleaned;
  }
function _sanitizeOptions ( list ) { var item ; var cleaned = [ ] ; for ( var i = 0 , len = list . length ; i < len ; i ++ ) { item = list [ i ] ; if ( ! strings . stringValid ( item . value ) ) { console . log ( '\'' + item . value + '\' is not a valid value' ) ; element . classList . remove ( BASE_CLASS ) ; return false ; } cleaned . push ( { value : item . value , text : item . text , checked : item . defaultSelected } ) ; } return cleaned ; }
Cleans up a list of options for saving to memory.
Cleans up a list of options for saving to memory .
// If the value isn't valid kill the script and prompt the developer. // TODO: Update to throw an error and handle the error vs logging. // TODO: Remove this line if the class is added via markup.