You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
325 B
13 lines
325 B
function isV8flags(flag, v8flags) { |
|
return v8flags.indexOf(replaceSeparatorsFromDashesToUnderscores(flag)) >= 0; |
|
} |
|
|
|
function replaceSeparatorsFromDashesToUnderscores(flag) { |
|
var arr = /^(-+)(.*)$/.exec(flag); |
|
if (!arr) { |
|
return flag; |
|
} |
|
return arr[1] + arr[2].replace(/\-/g, '_'); |
|
} |
|
|
|
module.exports = isV8flags;
|
|
|