packages/extension-map/lib/hashmap_extension.js
/**
 * If the variable name is a prefixed name (format prefix:name), expand it 
 * to the full name; returns the original variable name if not prefixed.
 * 
 * @param varName variable name
 * @param prefixes a list of known prefixes in <short name>: <expanded name>
 * 
 * @return the variable name, expanded if it had a prefix on it
 */
If the variable name is a prefixed name (format prefix:name), expand it
to the full name; returns the original variable name if not prefixed.

@param varName variable name
@param prefixes a list of known prefixes in : 

@return the variable name, expanded if it had a prefix on it
If the variable name is a prefixed name ( format prefix : name ) expand it to the full name ; returns the original variable name if not prefixed . @param varName variable name @param prefixes a list of known prefixes in : @return the variable name expanded if it had a prefix on it
function expandedVarName(varName, prefixes) { 
    const varComponents = varName.match(/^([\w]+):(.*)$/);
    if (varComponents !== null && varComponents.length == 3) {
        const prefix = varComponents[1];
        const name = varComponents[2];
        if (prefix.length === 0 || name.length === 0) throw Error("Hashmap extension given invalid target variable name " + varName);
        if (!(prefix in prefixes)) throw Error("Hashmap extension given undefined variable prefix " + prefix);
        expandedName = prefixes[prefix] + name; 
    } else {
        expandedName = varName;
    }
    return expandedName;
}
function expandedVarName ( varName , prefixes ) { const varComponents = varName . match ( / ^([\w]+):(.*)$ / ) ; if ( varComponents !== null && varComponents . length == 3 ) { const prefix = varComponents [ 1 ] ; const name = varComponents [ 2 ] ; if ( prefix . length === 0 || name . length === 0 ) throw Error ( "Hashmap extension given invalid target variable name " + varName ) ; if ( ! ( prefix in prefixes ) ) throw Error ( "Hashmap extension given undefined variable prefix " + prefix ) ; expandedName = prefixes [ prefix ] + name ; } else { expandedName = varName ; } return expandedName ; }
If the variable name is a prefixed name (format prefix:name), expand it
 to the full name; returns the original variable name if not prefixed.
If the variable name is a prefixed name ( format prefix : name ) expand it to the full name ; returns the original variable name if not prefixed .
// Verify we've got a good const name, prefix, and prefix value // Not a prefixed name