* Refactor for activeIdentityToken * Account selector stuff * Small refactor * Tweak * That's a wrap * comment * Lint fix * Localize * Lint fix * Close view on error * parse error when gathering tracking urls --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
25 lines
542 B
Plaintext
25 lines
542 B
Plaintext
namespace OptionUtils
|
|
|
|
function Get(opts as object, key as string) as dynamic
|
|
if opts = invalid
|
|
return invalid
|
|
end if
|
|
|
|
return opts[key]
|
|
end function
|
|
|
|
function GetOrDefault(opts as object, key as string, defaultValue as dynamic) as dynamic
|
|
if opts = invalid or not opts.DoesExist(key)
|
|
return defaultValue
|
|
end if
|
|
|
|
value = opts[key]
|
|
if value = invalid
|
|
return defaultValue
|
|
end if
|
|
|
|
return value
|
|
end function
|
|
|
|
end namespace
|