// TODO: replace with yargs. const bad = readConfig(process.argv[2]); const good = readConfig(process.argv[3]);
function readConfig(filepath: string): object { return JSON.parse(fs.readFileSync(filepath, 'utf-8'));
}
function getFeatures(config: object) { const enabledFeatures = new Set(); const distabledFeatures = new Set(); for (const key of Object.keys(config)) { const item = config[key]; for (const subitem of item) { // In field trials, only the first experiment applies. // TODO: this should be per platform. const exp = subitem['experiments'][0]; for (const feature of exp['enable_features'] ?? []) {
enabledFeatures.add(feature);
} for (const feature of exp['disable_features'] ?? []) {
enabledFeatures.add(feature);
}
}
} return {enabledFeatures, distabledFeatures};
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.