* Enables the given `feature`, and optionally adds the `parameters` to it. * For example: * ```js * featureSet.enable('DevToolsFreestyler', {patching: true}); * ``` * The parameters are additive. * * @param feature the name of the feature to enable. * @param parameters the ad
(feature, parameters = {})
| 128 | * the form of key/value pairs. |
| 129 | */ |
| 130 | enable(feature, parameters = {}) { |
| 131 | this.#disabled.delete(feature); |
| 132 | if (!this.#enabled.has(feature)) { |
| 133 | this.#enabled.set(feature, Object.create(null)); |
| 134 | } |
| 135 | for (const [key, value] of Object.entries(parameters)) { |
| 136 | this.#enabled.get(feature)[key] = value; |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Merge the other `featureSet` into this. |
no test coverage detected