You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ionic/config/config.ts
+40-11Lines changed: 40 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,9 @@ export class Config {
124
124
* Returns a single config value, given a key.
125
125
*
126
126
* @param {string} [key] - the key for the config value
127
-
* @param {any} [fallbackValue] - a fallback value to use when the config value was not found, or is config value is `null`. Fallback value defaults to `null`.
127
+
* @param {any} [fallbackValue] - a fallback value to use when the config
128
+
* value was not found, or is config value is `null`. Fallback value
129
+
* defaults to `null`.
128
130
*/
129
131
get(key: string,fallbackValue: any=null): any{
130
132
@@ -232,13 +234,42 @@ export class Config {
232
234
/**
233
235
* @name getBoolean
234
236
* @description
235
-
* Same as `get()`, however always returns a boolean value.
236
-
*
237
+
* Same as `get()`, however always returns a boolean value. If the
238
+
* value from `get()` is `null`, then it'll return the `fallbackValue`
239
+
* which defaults to `false`. Otherwise, `getBoolean()` will return
240
+
* if the config value is truthy or not. It also returns `true` if
241
+
* the config value was the string value `"true"`.
237
242
* @param {string} [key] - the key for the config value
243
+
* @param {boolean} [fallbackValue] - a fallback value to use when the config
244
+
* value was `null`. Fallback value defaults to `false`.
0 commit comments