src/services/state-router.js
function(name) {
    name = name || '';

    // TODO optimize with RegExp

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

    return true;
  }
function(name) {
    name = name || '';

    // TODO optimize with RegExp

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

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

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