packages/extension-map/lib/regex_extension.js
/**
 * Expand the variable passed in shortPrefixedVar, and add it to a list of the known
 * fully expanded variables.
 *
 * @param shortPrefixedVar a short prefixed variable name e.g., ?<dem:id>
 * @param expandedVars the list of known variables
 * @param prefixes the prefix hash that maps short prefix name to the full URI prefix
 *
 * @return the fully expanded variable name
 */
Expand the variable passed in shortPrefixedVar, and add it to a list of the known
fully expanded variables.

@param shortPrefixedVar a short prefixed variable name e.g., ?
@param expandedVars the list of known variables
@param prefixes the prefix hash that maps short prefix name to the full URI prefix

@return the fully expanded variable name
Expand the variable passed in shortPrefixedVar and add it to a list of the known fully expanded variables . @param shortPrefixedVar a short prefixed variable name e . g . ? @param expandedVars the list of known variables @param prefixes the prefix hash that maps short prefix name to the full URI prefix @return the fully expanded variable name
function buildExpandedVars(shortPrefixedVar, expandedVars, prefixes) {
    const v = extUtils.unescapeMetaChars( shortPrefixedVar.substr(2, shortPrefixedVar.length - 3) );
    const expandedVarName = applyPrefix(v, prefixes);
  if (expandedVarName in expandedVars)
        throw Error("unable to process prefixes in " + expandedVarName);
    expandedVars.push(expandedVarName);
    return expandedVarName;
}
function buildExpandedVars ( shortPrefixedVar , expandedVars , prefixes ) { const v = extUtils . unescapeMetaChars ( shortPrefixedVar . substr ( 2 , shortPrefixedVar . length - 3 ) ) ; const expandedVarName = applyPrefix ( v , prefixes ) ; if ( expandedVarName in expandedVars ) throw Error ( "unable to process prefixes in " + expandedVarName ) ; expandedVars . push ( expandedVarName ) ; return expandedVarName ; }
Expand the variable passed in shortPrefixedVar, and add it to a list of the known
 fully expanded variables.
Expand the variable passed in shortPrefixedVar and add it to a list of the known fully expanded variables .
// shortPrefixedVar will look like this: ?<test:string> - strip off the ?< and > chars // Add this new const to the list and return the expanded const name