src/utils/sassValueParser/index.js
function isInsideFunctionCall(string, index) {
  const result = { is: false, fn: null };
  const before = string.substring(0, index).trim();
  const after = string.substring(index + 1).trim();
  const beforeMatch = before.match(/([a-zA-Z_-][a-zA-Z0-9_-]*)\([^(){},]+$/);

  if (beforeMatch && beforeMatch[0] && after.search(/^[^(,]+\)/) !== -1) {
    result.is = true;
    result.fn = beforeMatch[1];
  }

  return result;
}
function isInsideFunctionCall(string, index) {
  const result = { is: false, fn: null };
  const before = string.substring(0, index).trim();
  const after = string.substring(index + 1).trim();
  const beforeMatch = before.match(/([a-zA-Z_-][a-zA-Z0-9_-]*)\([^(){},]+$/);

  if (beforeMatch && beforeMatch[0] && after.search(/^[^(,]+\)/) !== -1) {
    result.is = true;
    result.fn = beforeMatch[1];
  }

  return result;
}
function isInsideFunctionCall ( string , index ) { const result = { is : false , fn : null } ; const before = string . substring ( 0 , index ) . trim ( ) ; const after = string . substring ( index + 1 ) . trim ( ) ; const beforeMatch = before . match ( / ([a-zA-Z_-][a-zA-Z0-9_-]*)\([^(){},]+$ / ) ; if ( beforeMatch && beforeMatch [ 0 ] && after . search ( / ^[^(,]+\) / ) !== - 1 ) { result . is = true ; result . fn = beforeMatch [ 1 ] ; } return result ; }
Checks if the character is inside a function agruments

@param {String} string - the input string
@param {Number} index - current character index
@return {Object} return
{Boolean} return.is - if inside a function arguments
{String} return.fn - function name
Checks if the character is inside a function agruments