src/property-chains.js
function parsePropertyChains(expr) {
  var parsedExpr = '', chain;

  // allow recursion (e.g. into function args) by resetting propertyRegex
  // This is more efficient than creating a new regex for each chain, I assume
  var prevCurrentIndex = currentIndex;
  var prevLastIndex = propertyRegex.lastIndex;

  currentIndex = 0;
  propertyRegex.lastIndex = 0;
  while ((chain = nextChain(expr)) !== false) {
    parsedExpr += chain;
  }

  // Reset indexes
  currentIndex = prevCurrentIndex;
  propertyRegex.lastIndex = prevLastIndex;
  return parsedExpr;
}
function parsePropertyChains(expr) {
  var parsedExpr = '', chain;

  // allow recursion (e.g. into function args) by resetting propertyRegex
  // This is more efficient than creating a new regex for each chain, I assume
  var prevCurrentIndex = currentIndex;
  var prevLastIndex = propertyRegex.lastIndex;

  currentIndex = 0;
  propertyRegex.lastIndex = 0;
  while ((chain = nextChain(expr)) !== false) {
    parsedExpr += chain;
  }

  // Reset indexes
  currentIndex = prevCurrentIndex;
  propertyRegex.lastIndex = prevLastIndex;
  return parsedExpr;
}
function parsePropertyChains ( expr ) { var parsedExpr = '' , chain ; // allow recursion (e.g. into function args) by resetting propertyRegex // This is more efficient than creating a new regex for each chain, I assume var prevCurrentIndex = currentIndex ; var prevLastIndex = propertyRegex . lastIndex ; currentIndex = 0 ; propertyRegex . lastIndex = 0 ; while ( ( chain = nextChain ( expr ) ) !== false ) { parsedExpr += chain ; } // Reset indexes currentIndex = prevCurrentIndex ; propertyRegex . lastIndex = prevLastIndex ; return parsedExpr ; }
Finds and parses the property chains in an expression.
Finds and parses the property chains in an expression .