* Looks into an options object for a specific attribute * * * This method looks into the options object, and if an attribute is defined, returns it, * and if not, returns the default value * * * @template T * @method getOption * @param {Object | undefined} options
(options, optionName, defaultValue)
| 245 | * @return {T} options[optionName] if defined, defaultValue if not. |
| 246 | */ |
| 247 | static getOption(options, optionName, defaultValue) { |
| 248 | if (options !== undefined && typeof options[optionName] !== 'undefined') { |
| 249 | return options[optionName]; |
| 250 | } else { |
| 251 | return defaultValue; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | |
| 256 | /** |