<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.iccup.org/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AFeatureFlag%2Fdoc</id>
	<title>Модуль:FeatureFlag/doc - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.iccup.org/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AFeatureFlag%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.iccup.org/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:FeatureFlag/doc&amp;action=history"/>
	<updated>2026-06-01T17:32:33Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.iccup.org/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:FeatureFlag/doc&amp;diff=129&amp;oldid=prev</id>
		<title>DarkMuse: Новая страница: «&lt;!--      Documentation for Module:FeatureFlag  --&gt;  =FeatureFlag Module Documentation=  The `FeatureFlag` module is used to manage feature flags, which are boolean values controlling whether certain code paths related to new features are enabled or not. This module provides functionality to read, set, and temporarily apply feature flags.  ==Usage==  Feature flags can be used to enable or disable specific features or parts of code. They can be set permanentl...»</title>
		<link rel="alternate" type="text/html" href="https://wiki.iccup.org/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:FeatureFlag/doc&amp;diff=129&amp;oldid=prev"/>
		<updated>2024-08-31T15:12:36Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «&amp;lt;!--      Documentation for Module:FeatureFlag  --&amp;gt;  =FeatureFlag Module Documentation=  The `FeatureFlag` module is used to manage feature flags, which are boolean values controlling whether certain code paths related to new features are enabled or not. This module provides functionality to read, set, and temporarily apply feature flags.  ==Usage==  Feature flags can be used to enable or disable specific features or parts of code. They can be set permanentl...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- &lt;br /&gt;
    Documentation for Module:FeatureFlag &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FeatureFlag Module Documentation=&lt;br /&gt;
&lt;br /&gt;
The `FeatureFlag` module is used to manage feature flags, which are boolean values controlling whether certain code paths related to new features are enabled or not. This module provides functionality to read, set, and temporarily apply feature flags.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
Feature flags can be used to enable or disable specific features or parts of code. They can be set permanently or temporarily for a specific scope. This is useful for enabling experimental features, rolling out new functionalities gradually, or toggling features for debugging purposes.&lt;br /&gt;
&lt;br /&gt;
===Example Usage===&lt;br /&gt;
To get the value of a feature flag:&lt;br /&gt;
&amp;lt;code lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Get the current value of a feature flag&lt;br /&gt;
local isEnabled = FeatureFlag.get(&amp;#039;chiseled_face&amp;#039;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set the value of a feature flag:&lt;br /&gt;
&amp;lt;code lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Set a feature flag to true&lt;br /&gt;
FeatureFlag.set(&amp;#039;thick_mustache&amp;#039;, true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To apply feature flags temporarily inside a specific function scope:&lt;br /&gt;
&amp;lt;code lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Temporarily set feature flags&lt;br /&gt;
FeatureFlag.with({rugged_grin = true}, function()&lt;br /&gt;
    -- Code executed with the feature flag set&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
&lt;br /&gt;
{{ApiDocStart|FeatureFlag|link=Module:FeatureFlag}}&lt;br /&gt;
{{ApiDoc|get|params=flag: string|description=Retrieves the boolean value of a feature flag. Returns the default value if the flag has not been set.|returns=boolean}}&lt;br /&gt;
{{ApiDoc|set|params=flag: string, value: boolean?|description=Sets the value of a feature flag. If the value is nil, it resets the flag to its default value.|returns=nil}}&lt;br /&gt;
{{ApiDoc|with|params=flags: {[string]: boolean}, f: function|description=Temporarily sets feature flags inside the provided function scope. After execution, flags are restored to their previous values.|returns=Result of the function execution or an error}}&lt;br /&gt;
{{ApiDoc|getConfig|params=flag: string|description=Retrieves the configuration for a specified feature flag, including its default value.|returns=table containing the defaultValue}}&lt;br /&gt;
{{ApiDocEnd}}&lt;br /&gt;
&lt;br /&gt;
==Feature Flag Configuration==&lt;br /&gt;
Feature flags are configured in `Module:FeatureFlag/Config`. Each flag should have an entry specifying its default value. When a flag is accessed for the first time, its value is read from this configuration.&lt;br /&gt;
&lt;br /&gt;
==Wikitext Integration==&lt;br /&gt;
Feature flags are accessible in wikitext using the VariablesLua extension. Example usage in wikitext:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
{{#var:feature_chiseled_face}}&lt;br /&gt;
{{#vardefine:feature_thick_mustache|1}}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
- Ensure that `Module:FeatureFlag/Config` contains all feature flags used in the code.&lt;br /&gt;
- Feature flags should be used responsibly to control feature rollouts and testing scenarios.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Module:FeatureFlag/Config]] - Configuration file for defining feature flags and their default values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature management modules]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DarkMuse</name></author>
	</entry>
</feed>