plugins/restiming.js
/**
	 * Trims the URL according to the specified URL trim patterns,
	 * then applies a length limit.
	 *
	 * @param {string} url URL to trim
	 * @param {string} urlsToTrim List of URLs (strings or regexs) to trim
	 * @return {string} Trimmed URL
	 */
Trims the URL according to the specified URL trim patterns,
then applies a length limit.

@param {string} url URL to trim
@param {string} urlsToTrim List of URLs (strings or regexs) to trim
@return {string} Trimmed URL
Trims the URL according to the specified URL trim patterns then applies a length limit . @param { string } url URL to trim @param { string } urlsToTrim List of URLs ( strings or regexs ) to trim @return { string } Trimmed URL
function trimUrl(url, urlsToTrim) {
		var i, urlIdx, trim;
		if (url && urlsToTrim) {
			for (i = 0; i < urlsToTrim.length; i++) {
				trim = urlsToTrim[i];
				if (typeof trim === "string") {
					urlIdx = url.indexOf(trim);
					if (urlIdx !== -1) {
						url = url.substr(0, urlIdx + trim.length) + "...";
						break;
					}
				}
				else if (trim instanceof RegExp) {
					if (trim.test(url)) {
						url = url.replace(trim, "$1") + "...";
					}
				}
			}
		}
		return BOOMR.utils.cleanupURL(url, impl.urlLimit);
	}
function trimUrl ( url , urlsToTrim ) { var i , urlIdx , trim ; if ( url && urlsToTrim ) { for ( i = 0 ; i < urlsToTrim . length ; i ++ ) { trim = urlsToTrim [ i ] ; if ( typeof trim === "string" ) { urlIdx = url . indexOf ( trim ) ; if ( urlIdx !== - 1 ) { url = url . substr ( 0 , urlIdx + trim . length ) + "..." ; break ; } } else if ( trim instanceof RegExp ) { if ( trim . test ( url ) ) { url = url . replace ( trim , "$1" ) + "..." ; } } } } return BOOMR . utils . cleanupURL ( url , impl . urlLimit ) ; }
Trims the URL according to the specified URL trim patterns,
 then applies a length limit.
Trims the URL according to the specified URL trim patterns then applies a length limit .
// trim the payload from any of the specified URLs // replace the URL with the first capture group // apply limits