function eachSplitOrGroup(token, i) {
          var BACKSLASH_REGEX = /\\/g;

          // we can get groups as undefined under certain match circumstances
          var initialised = token || '';

          // the content of the url() statement is either in group 3 or group 5
          var mod = i % 7;
          if ((mod === 3) || (mod === 5)) {
            // split into uri and query/hash and then find the absolute path to the uri
            var split = initialised.split(/([?#])/g),
              uri = split[0],
              absolute = uri && findFile(options).absolute(directory, uri, resolvedRoot),
              query = options.keepQuery ? split.slice(1).join('') : '';

            // use the absolute path (or default to initialised)
            if (options.absolute) {
              return absolute && absolute.replace(BACKSLASH_REGEX, '/').concat(query) || initialised;
            }
            // module relative path (or default to initialised)
            else {
              var relative     = absolute && path.relative(filePath, absolute);
                //  rootRelative = relative && loaderUtils.urlToRequest(relative, '~');
              return (relative) ? relative.replace(BACKSLASH_REGEX, '/').concat(query) : initialised;
            }
          }
          // everything else, including parentheses and quotation (where present) and media statements
          else {
            return initialised;
          }
        }
/**
         * Encode the content portion of <code>url()</code> statements.
         * There are 4 capture groups in the split making every 5th unmatched.
         * @param {string} token A single split item
         * @param i The index of the item in the split
         * @returns {string} Every 3 or 5 items is an encoded url everything else is as is
         */
Encode the content portion of url() statements.
There are 4 capture groups in the split making every 5th unmatched.
@param {string} token A single split item
@param i The index of the item in the split
@returns {string} Every 3 or 5 items is an encoded url everything else is as is
Encode the content portion of url () statements . There are 4 capture groups in the split making every 5th unmatched . @param { string } token A single split item @param i The index of the item in the split @returns { string } Every 3 or 5 items is an encoded url everything else is as is
function eachSplitOrGroup(token, i) {
          var BACKSLASH_REGEX = /\\/g;
          var initialised = token || '';
          var mod = i % 7;
          if ((mod === 3) || (mod === 5)) {
            var split = initialised.split(/([?#])/g),
              uri = split[0],
              absolute = uri && findFile(options).absolute(directory, uri, resolvedRoot),
              query = options.keepQuery ? split.slice(1).join('') : '';
            if (options.absolute) {
              return absolute && absolute.replace(BACKSLASH_REGEX, '/').concat(query) || initialised;
            }
            else {
              var relative     = absolute && path.relative(filePath, absolute);
              return (relative) ? relative.replace(BACKSLASH_REGEX, '/').concat(query) : initialised;
            }
          }
          else {
            return initialised;
          }
        }
function eachSplitOrGroup ( token , i ) { var BACKSLASH_REGEX = / \\ / g ; var initialised = token || '' ; var mod = i % 7 ; if ( ( mod === 3 ) || ( mod === 5 ) ) { var split = initialised . split ( / ([?#]) / g ) , uri = split [ 0 ] , absolute = uri && findFile ( options ) . absolute ( directory , uri , resolvedRoot ) , query = options . keepQuery ? split . slice ( 1 ) . join ( '' ) : '' ; if ( options . absolute ) { return absolute && absolute . replace ( BACKSLASH_REGEX , '/' ) . concat ( query ) || initialised ; } else { var relative = absolute && path . relative ( filePath , absolute ) ; return ( relative ) ? relative . replace ( BACKSLASH_REGEX , '/' ) . concat ( query ) : initialised ; } } else { return initialised ; } }
Encode the content portion of <code>url()</code> statements.
Encode the content portion of <code > url () < / code > statements .
// we can get groups as undefined under certain match circumstances // the content of the url() statement is either in group 3 or group 5 // split into uri and query/hash and then find the absolute path to the uri // use the absolute path (or default to initialised) // module relative path (or default to initialised) //  rootRelative = relative && loaderUtils.urlToRequest(relative, '~'); // everything else, including parentheses and quotation (where present) and media statements