254 | );
255 | }
256 | ```
257 |
258 | ## Plugins
259 |
260 | ### Build-in plugins
261 |
262 | Rules:
263 |
264 | - **audience** checks whether the rule contains its name and enables the feature when its function responds truthy.
265 | - **queryParam** checks whether the rule contains its name and enables the feature depending on the URLs query parameter.
266 | - **rollouts** takes the first `number` and enables the feature for a percentage of users equal to that amount.
267 | - **launchDay** takes all `ISO 8601 date strings` and enables the feature when the date is in the past.
268 |
269 | Configurations:
270 |
271 | - **localConfig** fetches your configuration from a local JSON file or environment variables.
272 | - **remoteConfig** fetches your configuration from a remote endpoint, which allows decoupling deploy from release.
273 | - **customConfig** fetches your configuration with a customizable fetch.
274 |
275 | Miscellaneous:
276 |
277 | - **cache** adds simple caching to your evaluations which improve performance.
278 | - **anonymous** adds a generated, stable identity, which allows reliable rollout results.
279 |
280 | ### Custom plugins
281 |
282 | Plugins are plain old JavaScript objects with a simple interface that hooks
283 | into the lifecycle of Keat. Checkout [the common plugin interface on GitHub](https://github.com/WitoDelnat/keat/blob/main/src/core/plugin.ts) to get a full view on the available context and API.
284 |
285 | Here is the code for the launch day plugin:
286 |
287 | ```typescript
288 | export const launchDay = () => {
289 | createPlugin({
290 | matcher: isDate,
291 | evaluate({ literal }) {
292 | return literal.getTime() < Date.now();
293 | },
294 | });
295 | };
296 | ```
297 |
298 | ## License
299 |
300 | MIT
301 |
--------------------------------------------------------------------------------