Frontend/25_01_07/mai/node_modules/loader-utils/lib/getOptions.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

21 lines
398 B
JavaScript

'use strict';
const parseQuery = require('./parseQuery');
function getOptions(loaderContext) {
const query = loaderContext.query;
if (typeof query === 'string' && query !== '') {
return parseQuery(loaderContext.query);
}
if (!query || typeof query !== 'object') {
// Not object-like queries are not supported.
return {};
}
return query;
}
module.exports = getOptions;