mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-12-26 13:05:24 +00:00
14 lines
325 B
JavaScript
14 lines
325 B
JavaScript
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;
|