code: function prefix( state, url ) {
  	if ( state.config.urlPrefix ) {
  		if ( _.isRegExp( url ) ) {
  			return regex.prefix( state.config.urlPrefix, url );
  		} else {
  			var prefixIndex = url.indexOf( state.config.urlPrefix );
  			var appliedPrefix = prefixIndex === 0 ? '' : state.config.urlPrefix;
  			return buildUrl( appliedPrefix, url );
  		}
  	} else {
  		return url;
  	}
  }
docs: apply prefix to url if one exists