src/services/state-router.js
function(query) {
    query = query || '';
    
    // TODO optimize with RegExp

    var nameChain = query.split('.');
    for(var i=0; i<nameChain.length; i++) {
      if(!nameChain[i].match(/(\*(\*)?|[a-zA-Z0-9_]+)/)) {
        return false;
      }
    }

    return true;
  }
function(query) {
    query = query || '';
    
    // TODO optimize with RegExp

    var nameChain = query.split('.');
    for(var i=0; i<nameChain.length; i++) {
      if(!nameChain[i].match(/(\*(\*)?|[a-zA-Z0-9_]+)/)) {
        return false;
      }
    }

    return true;
  }
function ( query ) { query = query || '' ; // TODO optimize with RegExp var nameChain = query . split ( '.' ) ; for ( var i = 0 ; i < nameChain . length ; i ++ ) { if ( ! nameChain [ i ] . match ( / (\*(\*)?|[a-zA-Z0-9_]+) / ) ) { return false ; } } return true ; }
Validate state query

@param  {String} query A query for the state; using dot-notation
@return {Boolean}      True if name is valid, false if not
Validate state query