1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/loader-utils/lib/getOptions.js

21 lines
400 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
'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 null;
}
return query;
}
module.exports = getOptions;