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;
}
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;
}
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 ; }
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.
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 .
Returns the normalized v8 flag