plugin/boomerang/boomerang-1.0.0.js
/**
		 * Builds an array of path components.
		 *
		 * @param {number} addSlashUntil Length of path components
		 */
Builds an array of path components.
@param {number} addSlashUntil Length of path components
Builds an array of path components . @param { number } addSlashUntil Length of path components
function splitUrlPaths(addSlashUntil) {
			return function(accumulator, currentValue, currentIndex) {
				var parts, j;
				if (currentValue.indexOf(XSS_BREAK_DELIM) !== -1) {
					parts = currentValue.split(XSS_BREAK_DELIM);
					for (j = 0; j < parts.length - 1; j++) {
						accumulator.push(parts[j]);
						accumulator.push(XSS_BREAK_DELIM);
					}
					currentValue = parts.slice(-1);
				}
				if (typeof addSlashUntil === "number" && currentIndex < addSlashUntil) {
					currentValue += "/";
				}
				return accumulator.concat(currentValue);
			};
		}
function splitUrlPaths ( addSlashUntil ) { return function ( accumulator , currentValue , currentIndex ) { var parts , j ; if ( currentValue . indexOf ( XSS_BREAK_DELIM ) !== - 1 ) { parts = currentValue . split ( XSS_BREAK_DELIM ) ; for ( j = 0 ; j < parts . length - 1 ; j ++ ) { accumulator . push ( parts [ j ] ) ; accumulator . push ( XSS_BREAK_DELIM ) ; } currentValue = parts . slice ( - 1 ) ; } if ( typeof addSlashUntil === "number" && currentIndex < addSlashUntil ) { currentValue += "/" ; } return accumulator . concat ( currentValue ) ; } ; }
Builds an array of path components.
Builds an array of path components .
// if this component has the XSS_BREAK_DELIM character in it, we need // to break it up // break at that character // add everything but the last one with special XSS_BREAK_DELIM nodes // add this component // add back in the XSS_BREAK_DELIM // add the last part // add a '/' for everything but the last one