Allow code feature to run
Feature.get("foo")Feature support is set in initial config passed to app
Helper methods
Feature.set("foo", true)
Feature.reset("foo")
Feature.resetAll()Clears any programatically set values for all features
Handlebars helper
{{#feature "foo"}} ... {{/feature}}Requires
- handlebars
- Source:
Methods
get(name)
Returns whether a given feature is supported
Parameters
| Name | Type | Description |
|---|---|---|
name |
string | Name of feature to execute |
- Source:
Returns
boolean
reset(name)
Reset the value of a single feature to intital configuration
Parameters
| Name | Type | Description |
|---|---|---|
name |
string | Name of feature to reset to original value |
- Source:
resetAll()
Clear all feature values - resets back to initial configuration
- Source:
set(name, val)
Change the value of a feature
Parameters
| Name | Type | Description |
|---|---|---|
name |
string | Name of feature to set |
val |
boolean | Value of feature |
- Source: