(loaderName, context)
| 41 | } |
| 42 | |
| 43 | function getOptionsArr (loaderName, context) { |
| 44 | const rawOptions = context.getOptions() |
| 45 | const rawOptionsArr = ( |
| 46 | typeof rawOptions.multiple !== 'undefined' |
| 47 | ? rawOptions.multiple |
| 48 | : [rawOptions] |
| 49 | ) |
| 50 | const optionsArr = [] |
| 51 | |
| 52 | for (const rawOptionsIdx in rawOptionsArr) { |
| 53 | const rawOptions = rawOptionsArr[rawOptionsIdx] |
| 54 | |
| 55 | validate(optionsSchema, rawOptions, { name: loaderName }) |
| 56 | |
| 57 | optionsArr[rawOptionsIdx] = Object.assign({}, defaultOptions, rawOptions) |
| 58 | } |
| 59 | |
| 60 | return optionsArr |
| 61 | } |
| 62 | |
| 63 | module.exports = getOptionsArr |
no outgoing calls
no test coverage detected
searching dependent graphs…