| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | export default applyOptions; |
||
| 3 | function applyOptions(optionsBlueprint, options) { |
||
| 4 | var returnOptions = {}; |
||
| 5 | for (var name in optionsBlueprint) { |
||
| 6 | if (optionsBlueprint.hasOwnProperty(name)) { |
||
| 7 | if (typeof options[name] !== 'undefined') { |
||
| 8 | returnOptions[name] = convertOption(options[name], optionsBlueprint[name].type); |
||
| 9 | } |
||
| 10 | else { |
||
| 11 | returnOptions[name] = optionsBlueprint[name].default; |
||
| 12 | } |
||
| 13 | } |
||
| 14 | } |
||
| 15 | return returnOptions; |
||
| 16 | } |
||
| 17 | |||
| 33 |