Replace dashes with underscores in the v8Flag name
Also ensure that if the arg contains a value (e.g. --arg=true)
that only the flag is returned.
514811
function getNormalizedV8Flag(arg) {
  // v8 uses the "no" prefix to negate boolean flags (e.g. --nolezy),
  // but they are not listed by v8flags
  const matches = arg.match(/--(?:no)?(.+)/);

  if (matches) {
    return `--${matches[1].replace(/-/g, "_")}`;
  }

  return arg;
}
516577
def get_access_flags_string(value):
    
    buff = ""
    for i in ACCESS_FLAGS:
        if (i[0] & value) == i[0]:
            buff += i[1] + " "

    if buff != "":
        return buff[:-1]
    return buff
668878
function getFunctionNameAndArgs(value) {
    var pattern = /^(.*)\{\{([^()]+?)(\((.+)\))?\}\}(.*)$/g,
    match, func, args;
    var argArray = [], surroundings = [];
    var retValue;

    while (match = pattern.exec(value)) {
      surroundings[0] = match[1];
      func = match[2];
      args = match[4];
      surroundings[1] = match[5];
    }

    if (args !== undefined ){
      if (args.indexOf("[") !== -1){
        // is an array as string
        args = JSON.parse(args);
        argArray.push(args);
      } else {
        // one or more string/number params
        args = args.replace(/, /gi, ",");
        args = args.replace(/'/gi, "", "gi");
        argArray = args.split(',');
      }
    }
    // return value if no Faker method is detected
    retValue = func ?
      executeFunctionByName(func,argArray) :
      value;

    if(surroundings[0]) {	// prefix
      retValue = surroundings[0] + retValue;
    }

    if(surroundings[1]) {	// postfix
      retValue += surroundings[1];
    }

    return retValue;
  }
363188
def sort_args(args):
    """"""
    args = args.copy()
    flags = [i for i in args if FLAGS_RE.match(i[1])]

    for i in flags:
        args.remove(i)

    return args + flags
665692
def is_potential_flag(token: str, parser: argparse.ArgumentParser) -> bool:
    """"""
    # if it's an empty string, it was meant to be a positional
    if not token:
        return False

    # if it doesn't start with a prefix, it was meant to be positional
    if not token[0] in parser.prefix_chars:
        return False

    # if it's just a single character, it was meant to be positional
    if len(token) == 1:
        return False

    # if it looks like a negative number, it was meant to be positional
    # unless there are negative-number-like options
    if parser._negative_number_matcher.match(token):
        if not parser._has_negative_number_optionals:
            return False

    # if it contains a space, it was meant to be a positional
    if ' ' in token:
        return False

    # Looks like a flag
    return True
927054
function filterArgs(args, exclude) {
    args = splitArgs(args || []);
    exclude = splitArgs(exclude || []);
    var clone = args.slice(0);
    return clone.filter(function (arg, i) {
        if (!~exclude.indexOf(arg))
            return true;
        var next = clone[i + 1];
        if (_flagExp.test(arg) && next && !_flagExp.test(next))
            clone.splice(i + 1, 1);
        return false;
    });
}
264017
function dashProperCase(str) {
        if ( !str.length ) {
            return str;
        }
        return str.split('-').map(function (piece) {
            if ( piece.length ) {
                return piece.substring(0, 1).toUpperCase() + piece.substring(1);
            }
            return piece;
        }).join('-');
    }
992436
function format (str, ...args) {
  return str.replace(/{(\d+)}/g, function (match, number) {
    return typeof args[number] === 'undefined'
      ? match
      : args[number]
    ;
  })
}
717017
def shellfilter(value):
    """"""
    replacements = {'\\': '\\\\',
                    '`': '\\`',
                    "'": "\\'",
                    '"': '\\"'}
    for search, repl in replacements.items():
        value = value.replace(search, repl)
    return safestring.mark_safe(value)
198307
def apply_markup(value, arg=None):
    
    if arg is not None:
        return formatter(value, filter_name=arg)
    return formatter(value)
846477
@Override
	public String cleanArg(String arg) {
		String angularvar = "(,\"\\$\\$\\w+\":\".*\")";
		return arg.replaceAll(angularvar, "");
	}
1182918
function ( obj, arg ) {
		arg = arg || ",";

		return string.trim( obj ).split( new RegExp( "\\s*" + arg + "\\s*" ) );
	}
1242495
function replaceStringPlaceholders(string, args) {
    for (var i = 1; i < args.length; i++) {
        var value = args[i];
        if (typeof value === "object") {
            value = JSON.stringify(value);
        }

        string = string.replace("{}", value);
    }

    return string;
}
945935
protected boolean containsFlag(final char flag, final String flags) {
        if (flags == null) return false;
        return flags.indexOf(flag) >= 0;
    }
531375
def pretty_flags(flags):
    """"""
    names = []
    result = "0x%08x" % flags
    for i in range(32):
        flag = 1 << i
        if flags & flag:
            names.append(COMPILER_FLAG_NAMES.get(flag, hex(flag)))
            flags ^= flag
            if not flags:
                break
    else:
        names.append(hex(flags))
    names.reverse()
    return "%s (%s)" % (result, " | ".join(names))
1344479
private boolean evaluateConditionFlags(String flags) {
        int p = 0;
        while (true) {
            p = skipBlanks(flags, p);
            if (p >= flags.length()) {
                break;
            }
            boolean complement = false;
            if (flags.charAt(p) == '!') {
                complement = true;
                p++;
            }
            p = skipBlanks(flags, p);
            if (p >= flags.length()) {
                break;
            }
            int p0 = p;
            p = skipNonBlanks(flags, p0 + 1);
            String flag = flags.substring(p0, p).toUpperCase();
            if ((conditionFlags != null && conditionFlags.contains(flag)) ^ complement) {
                return true;
            }
        }
        return false;
    }
461317
def getFlag(self, flagName):
        
        assert (len(flagName) > 0)

        return Flag(os.path.join(self._variablesDirPath, flagName))