add.[ALL]
This commit is contained in:
parent
5ac24c8cea
commit
780ad9a200
54 changed files with 3733 additions and 0 deletions
26
.resources/app/common/FeatureFlags.js
Normal file
26
.resources/app/common/FeatureFlags.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
class FeatureFlags {
|
||||
constructor() {
|
||||
this.flags = new Set();
|
||||
}
|
||||
getSupported() {
|
||||
return Array.from(this.flags);
|
||||
}
|
||||
supports(feature) {
|
||||
return this.flags.has(feature);
|
||||
}
|
||||
declareSupported(feature) {
|
||||
if (this.supports(feature)) {
|
||||
console.error('Feature redeclared; is this a duplicate flag? ', feature);
|
||||
return;
|
||||
}
|
||||
this.flags.add(feature);
|
||||
}
|
||||
}
|
||||
exports.default = FeatureFlags;
|
||||
module.exports = exports.default;
|
Loading…
Add table
Add a link
Reference in a new issue